#!/bin/bash # # Scriptname: generate-diff-report # Author: Shri Amit (amit) # # Usage: generate-diff-report -i -[w] -r # -p -l -s -f # Synopsis: The following script starts , the argument # to -[webster|emulator] and compiles and executes , # the argument to -suite, with the diff-report-function. # The output is stored into , the arg to -logfile # Only webster & emulator images are supported. # Arguments: -i: Image # -w: Marks Image to be a webster image otherwise assumes to # be an emulator image. (No args, this is only a flag) # -r: Dylan Root, defaults to ~/releases/webster-8000 # -p: Dylan Personal Root to ~/ # -l: Name of Library in which suite is contained # -s: Name of Suite(emulator) or App (Webster) , defaults to # LibraryName # -f: DiffReportLogFile ############################################################################ ## Initialize all constants script=`basename $0` platform=`/u/dylan/tools/admin/get-host-name.pl` report="diff-report-function" websh=/u/dylan/releases/webster/admin/webster-env.sh ## Parse the options & flags on the command line while getopts i:r:p:s:l:f:w option do case $option in i) image=$OPTARG;; r) root=$OPTARG;; p) personalroot=$OPTARG;; s) suitename=$OPTARG;; f) logfile=$OPTARG;; w) imagetype=2;; l) libraryname=$OPTARG;; \?) echo "Usage: generate-diff-report -[w|e] -r -p -s -l " exit 2;; esac done shift `expr $OPTIND - 1` ## Assign defaults image=${image:-foo} suitename=${suitename:-$libraryname} imagetype=${imagetype:-1} personalroot=${personalroot:-~/} root=${root:-~/releases/webster-8000} builddir=$root/build/$platform ## Ensure image existance if test ! -f $image; then echo "$script: Invalid image pathname. What should I compile in?" echo "Usage: generate-diff-report -[w|e] -r -p -s -l " exit 1; fi ## Depending upon imagetype, compile suite and emit diff logfile if test $imagetype -eq 1; then echo "All initializations successful ... starting the emulator ..." echo $image -init - <