feat: add mobilithek-while.sh
This commit is contained in:
parent
488532259a
commit
c6501a8a9d
|
@ -0,0 +1,32 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
echo "started..."
|
||||
#
|
||||
# special variable $# is the number of arguments
|
||||
if [ $# -lt 5 ] ; then
|
||||
echo 'Call ./<script> <size: absolute file name> <size: minimum file size in bytes> <dload: url> <dload: cert secret> <dload: cert file path & name>'
|
||||
exit 1
|
||||
fi
|
||||
#
|
||||
file="$1"
|
||||
minimumSize="$2"
|
||||
dloadUrl="$3"
|
||||
dloadCertKey="$4"
|
||||
dloadCertFile="$5"
|
||||
#
|
||||
retVal=1;
|
||||
#echo "retVal initial state: ${retVal}"
|
||||
#
|
||||
fileRemove=$file
|
||||
#echo "fileRemove: ${fileRemove}"
|
||||
fR1=${fileRemove%?}
|
||||
fR2=${fR1%?}
|
||||
fR3=${fR2%?}
|
||||
rm $fR3
|
||||
#
|
||||
echo "call script: file-dload-curl-cert-while.sh"
|
||||
sh ./file-dload-curl-cert-while.sh $file $minimumSize $dloadUrl $dloadCertKey $dloadCertFile
|
||||
#
|
||||
gunzip -q $file
|
||||
#
|
||||
echo "done."
|
|
@ -3,16 +3,15 @@
|
|||
echo "started..."
|
||||
#
|
||||
# special variable $# is the number of arguments
|
||||
if [ $# -lt 5 ] ; then
|
||||
echo 'Call ./<script> <size: absolute file name> <size: minimum file size in bytes> <dload: url> <dload: cert secret> <dload: cert file path & name>'
|
||||
if [ $# -lt 4 ] ; then
|
||||
echo 'Call ./<script> <save as abs file path & name with SUFFIX /<file name>.gz> <url> <cert secret> <cert file path & name>'
|
||||
exit 1
|
||||
fi
|
||||
#
|
||||
file="$1"
|
||||
minimumSize="$2"
|
||||
dloadUrl="$3"
|
||||
dloadCertKey="$4"
|
||||
dloadCertFile="$5"
|
||||
dloadUrl="$2"
|
||||
dloadCertKey="$3"
|
||||
dloadCertFile="$4"
|
||||
#
|
||||
retVal=1;
|
||||
#echo "retVal initial state: ${retVal}"
|
||||
|
@ -24,8 +23,8 @@ fR2=${fR1%?}
|
|||
fR3=${fR2%?}
|
||||
rm $fR3
|
||||
#
|
||||
echo "call script: file-dload-curl-cert-while.sh"
|
||||
sh ./file-dload-curl-cert-while.sh $file $minimumSize $dloadUrl $dloadCertKey $dloadCertFile
|
||||
echo "call script: file-dload-curl-cert.sh"
|
||||
sh ./file-dload-curl-cert.sh $dloadUrl $dloadCertKey $dloadCertFile $file
|
||||
#
|
||||
gunzip -q $file
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue