Child pages
  • Installationsvejledning version 1.9

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
#!/bin/bash
#
# Just to keep track of things
WORKBASE=/larmwork/work
CMDBASE=$HOME/services/AnalyseScript
# SOX uses /tmp by default
export SOX_OPTS="--temp /larmwork/work"
cmds[0]="./OverlapAnalyze.py P1 19890101 06 19980101 22 $WORKBASE/0 /home/larm/services/conf/P1_P2_P3_P4.properties"
cmds[1]="./OverlapAnalyze.py P1 19980101 22 20050630 00 $WORKBASE/1 /home/larm/services/conf/P1_P2_P3_P4.properties"
cmds[2]="./OverlapAnalyze.py P2 19890101 00 19980101 22 $WORKBASE/2 /home/larm/services/conf/P1_P2_P3_P4.properties"
cmds[3]="./OverlapAnalyze.py P2 19980101 22 20050630 00 $WORKBASE/3 /home/larm/services/conf/P1_P2_P3_P4.properties"
cmds[4]="./OverlapAnalyze.py P3 19890101 06 19980101 22 $WORKBASE/4 /home/larm/services/conf/P1_P2_P3_P4.properties"
cmds[5]="./OverlapAnalyze.py P3 19980101 22 20050630 00 $WORKBASE/5 /home/larm/services/conf/P1_P2_P3_P4.properties"
cmds[6]="./OverlapAnalyze.py P4 19970101 10 20050630 00 $WORKBASE/7 /home/larm/services/conf/P1_P2_P3_P4.properties"
case $1 in
    list)
        for ((i=0; i<${#cmds[@]}; i++))
        do
           echo "$i ${cmds[$i]}"
        done
        ;;
    run)
        if [ -n "${cmds[$2]}" ]; then
            echo "${cmds[$2]}"
            mkdir -p $WORKBASE/$2
            cd $CMDBASE && ${cmds[$2]}
        else
            echo "Unknown cmd"
            exit 1
        fi
        ;;
    *)
        echo "Use list or run <num>"
        exit 1
        ;;
esac