Fix the problem of unable to proxy download
parent
2778c87a03
commit
3a221f7bfd
|
@ -154,33 +154,35 @@ if [[ "$#" -gt '0' ]]; then
|
||||||
esac
|
esac
|
||||||
PROXY="-x $2"
|
PROXY="-x $2"
|
||||||
# Parameters available through a proxy server
|
# Parameters available through a proxy server
|
||||||
case "$3" in
|
if [[ "$#" -gt '2' ]]; then
|
||||||
'--version')
|
case "$3" in
|
||||||
if [[ "$#" -gt '4' ]] || [[ -z "$4" ]]; then
|
'--version')
|
||||||
echo 'error: Please specify the correct version.'
|
if [[ "$#" -gt '4' ]] || [[ -z "$4" ]]; then
|
||||||
|
echo 'error: Please specify the correct version.'
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
VERSION="$2"
|
||||||
|
;;
|
||||||
|
'-c' | '--check')
|
||||||
|
if [[ "$#" -gt '3' ]]; then
|
||||||
|
echo 'error: Please enter the correct command.'
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
CHECK='1'
|
||||||
|
;;
|
||||||
|
'-f' | '--force')
|
||||||
|
if [[ "$#" -gt '3' ]]; then
|
||||||
|
echo 'error: Please enter the correct command.'
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
FORCE='1'
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "$0: unknown option -- -"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
;;
|
||||||
VERSION="$2"
|
esac
|
||||||
;;
|
fi
|
||||||
'-c' | '--check')
|
|
||||||
if [[ "$#" -gt '3' ]]; then
|
|
||||||
echo 'error: Please enter the correct command.'
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
CHECK='1'
|
|
||||||
;;
|
|
||||||
'-f' | '--force')
|
|
||||||
if [[ "$#" -gt '3' ]]; then
|
|
||||||
echo 'error: Please enter the correct command.'
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
FORCE='1'
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "$0: unknown option -- -"
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "$0: unknown option -- -"
|
echo "$0: unknown option -- -"
|
||||||
|
|
Loading…
Reference in New Issue