#!/bin/sh # # ------- # idf2adf # ------- # # A sh script to write ASCII dump files using AiresIDF2ADF # # Written by S. J. Sciutto, Fermilab 1999. # # Last modification: 16/Apr/1999. # # Usage: # # AiresExport [options] taskname ... taskname # ############################################################################### # # Setting predefinded constants. # AiresSet="${HOME}/.airesrc" if [ -f $AiresSet ] then . $AiresSet else # # .airesrc file does not exist, trying in default bin directory. # AiresSet="${HOME}/aires/current/bin/airesrc" if [ -f $AiresSet ] then . $AiresSet else # # Have no other ideas about the setting file. # echo echo Cannot find internal script file! echo exit fi fi # Other predefined parameters are set after knowing the spool number. # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Checking input arguments. # if [ $# -lt 1 ] then echo echo "Usage: idf2adf taskname ... taskname" echo exit fi # program="$IDF2ADFprogram" # for arg in $*; do if [ -f ${arg}.adf ] then $echonlf "Overwrite file ${arg}.adf? [N]: " read sw if [ "_$sw" = "_y" -o "_$sw" = "_Y" -o \ "_$sw" = "_yes" -o "_$sw" = "_YES" -o "_$sw" = "_Yes" ] then doit=TRUE else echo Task ${arg} not processed. doit= fi else doit=TRUE fi # if [ $doit ] then alltasks="$alltasks $arg" fi done # if [ "_$alltasks" = "_" ] then exit fi # rm -f __IDF2ADFTasks.tmp $echonlf "" > __IDF2ADFTasks.tmp # for arg in $alltasks; do echo "Task $arg" >> __IDF2ADFTasks.tmp done echo >> __IDF2ADFTasks.tmp echo >> __IDF2ADFTasks.tmp # $program < __IDF2ADFTasks.tmp # rm -f __IDF2ADFTasks.tmp # exit # # This script file is part of the AIRES Runner System; # AIRES 2.8.4a distribution. # # xxx 0 Tue Dec 12 16:28:05 ART 2006