feat: adjust file-dload-curl-cert-while.sh
This commit is contained in:
parent
30bc0a57cb
commit
bf9d62875d
|
@ -3,8 +3,8 @@
|
|||
echo "started..."
|
||||
#
|
||||
# special variable $# is the number of arguments
|
||||
if [ $# -lt 7 ] ; then
|
||||
echo 'Call ./<script> <size: absolute file name> <size: minimum file size in bytes> <size: csv email recipient list> <dload: url> <dload: cert secret> <dload: cert file path & name> <dload: save as abs file path & name>'
|
||||
if [ $# -lt 6 ] ; then
|
||||
echo 'Call ./<script> <size: absolute file name> <size: minimum file size in bytes> <size: csv email recipient list> <dload: url> <dload: cert secret> <dload: cert file path & name>'
|
||||
exit 1
|
||||
fi
|
||||
#
|
||||
|
@ -14,19 +14,19 @@ emailRecipientList="$3"
|
|||
dloadUrl="$4"
|
||||
dloadCertKey="$5"
|
||||
dloadCertFile="$6"
|
||||
dloadFile="$7"
|
||||
#
|
||||
retVal=1;
|
||||
echo "retVal init: ${retVal}"
|
||||
#echo "retVal initial state: ${retVal}"
|
||||
#
|
||||
while [ $retVal -ne 0 ]
|
||||
do
|
||||
echo "call file-dload.sh"
|
||||
sh ./file-dload-curl-cert.sh $dloadUrl $dloadCertKey $dloadCertFile $dloadFile
|
||||
echo "call file-size.sh"
|
||||
echo "call script: file-dload-curl-cert.sh"
|
||||
sh ./file-dload-curl-cert.sh $dloadUrl $dloadCertKey $dloadCertFile $file
|
||||
echo "call script: file-size.sh"
|
||||
#TODO This looks like an asynchronous we are not waiting for, isn't it?
|
||||
sh ./file-size.sh $file $minimumSize $emailRecipientList
|
||||
retVal=$?
|
||||
echo "retVal: ${retVal}"
|
||||
#echo "retVal: ${retVal}"
|
||||
done
|
||||
exit $retVal
|
||||
#
|
||||
|
|
|
@ -4,14 +4,14 @@ echo "Started..."
|
|||
#
|
||||
# special variable $# is the number of arguments
|
||||
if [ $# -lt 4 ] ; then
|
||||
echo 'Call ./<script> <url> <cert secret> <cert file path & name> <save as abs file path & name with SUFFIX /gtfs.gz>'
|
||||
echo 'Call ./<script> <url> <cert secret> <cert file path & name> <save as abs file path & name with SUFFIX /<file name>.gz>'
|
||||
exit 1
|
||||
fi
|
||||
#
|
||||
downloadUrl="$1"
|
||||
certSecret="$2"
|
||||
certPath="$3"
|
||||
#ATTENTION: use SUFFIX ".../gtfs.gz"
|
||||
#output: ATTENTION: use SUFFIX ".../<file name>.gz"
|
||||
output="$4"
|
||||
echo "output: ${output}"
|
||||
#
|
||||
|
|
|
@ -19,7 +19,7 @@ fi
|
|||
minimumSize="$2"
|
||||
echo "minimumSize: ${minimumSize}"
|
||||
emailRecipientList="$3"
|
||||
echo "emailRicipientList: ${emailRecipientList}"
|
||||
#echo "emailRicipientList: ${emailRecipientList}"
|
||||
now=$(date +%Y%m%d%H%M%S)
|
||||
echo "now: ${now}"
|
||||
actualSize=$(wc -c <"$file")
|
||||
|
|
Loading…
Reference in New Issue