Commit 2834dabf authored by Baptiste CHOCOT's avatar Baptiste CHOCOT
Browse files

Revert -n to != None; add missing parameter; fix curl call

parent aa0288c7
Pipeline #230584 passed with stage
in 23 seconds
......@@ -6,7 +6,8 @@ user=$3
password=$4
token=$5
install_cli=$6 # not used
name=$7
sha=$7 # not used
name=$8
if [[ $location != "None" ]];then
cd $location
......@@ -18,15 +19,19 @@ mkdir "./$archive_dir"
cd "./$archive_dir"
options="-O -J -L"
if [[ -n "$token" ]]; then
if [[ "$token" != "None" ]]; then
echo curl -H "Authorization: Bearer $token" $options $url
curl -H "Authorization: Bearer $token" $options $url
else
if [[ $user != "None" ]] && [[ $password != "None" ]];then
if [[ $user != "None" ]] && [[ $password != "None" ]];then
echo "curl $options -u $user:$password $url"
curl $options -u $user:$password $url
else
if [[ $user != "None" ]] && [[ $password == "None" ]];then
echo curl $options -u $user $url
curl $options -u $user $url
else
echo curl $options $url
curl $options $url
fi
fi
......@@ -42,7 +47,7 @@ rm $archive
package=`ls`
if [[ -n "$name" ]] && [[ $name != $package ]]; then
if [[ "$name" != "None" ]] && [[ $name != $package ]]; then
mv $package $name
fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment