Add option to suppress storage copy for testing

This commit is contained in:
2016-05-04 10:47:04 -04:00
parent 790930dd66
commit e9a9ae186c
5 changed files with 26 additions and 4 deletions
+9 -3
View File
@@ -7,6 +7,7 @@ where:
-h show this help text
-d working directory
-f input filename
-t suppress storage copy
-u url to notify on completion"
# http://stackoverflow.com/a/246128/99492
@@ -23,7 +24,7 @@ notify_url=""
# $piscal_executable and $storage_directory
. "$base_directory/piscal_launcher.cfg"
while getopts "hd:f:u:" opt; do
while getopts "hd:f:u:t" opt; do
case "$opt" in
h )
echo "$usage"
@@ -32,6 +33,9 @@ while getopts "hd:f:u:" opt; do
d )
working_directory=$OPTARG
;;
t )
suppress_storage_copy=true
;;
u )
notify_url=$OPTARG
;;
@@ -93,8 +97,10 @@ fi
popd >> /dev/null
# copy output to storage
cp "$output_directory_touser"/* "$storage_directory"/
cp "$output_directory_nottouser"/* "$storage_directory"/
if [ -z "$suppress_storage_copy" ]; then
cp "$output_directory_touser"/* "$storage_directory"/
cp "$output_directory_nottouser"/* "$storage_directory"/
fi
# notify given url of completion
if [ -z "$notify_url" ]; then