File tree 1 file changed +6
-1
lines changed
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,11 @@ DOWNLOADS=(
41
41
[ -n " $DEBUG " ] && set -x
42
42
[ -z " $1 " ] && { echo " Usage: auto.sh <dest-path>" && exit 1; }
43
43
perl -MHTML::Parser -e 1 || { echo " ERROR: Perl Module HTML::Parser is not installed." && exit 1; }
44
+ if [[ " $( { curl -V| awk ' {print$2;exit}' ; echo " 7.16" ; } | sort -V | head -1) " == " 7.16" ]]; then
45
+ CURLOPT=" --no-sessionid"
46
+ else
47
+ CURLOPT=" "
48
+ fi
44
49
45
50
function getFormFields {
46
51
perl << EOF
@@ -114,7 +119,7 @@ for DATA in "${DOWNLOADS[@]}"; do
114
119
echo " DOWNLOADING: /tmp/$FILE "
115
120
DL=0
116
121
if [ ! -e /tmp/$FILE ]; then
117
- curl --location-trusted --no-sessionid -b /tmp/cookies -c /tmp/cookies -A " Mozilla/5.0" -o /tmp/$FILE " $URL "
122
+ curl --location-trusted $CURLOPT -b /tmp/cookies -c /tmp/cookies -A " Mozilla/5.0" -o /tmp/$FILE " $URL "
118
123
DL=1
119
124
fi
120
125
# 3) copy or unzip file into build destination
You can’t perform that action at this time.
0 commit comments