Commit 3d361d63 authored by Baptiste CHOCOT's avatar Baptiste CHOCOT
Browse files

replace a few checks by -n operator

parent 425deeaa
Pipeline #230574 passed with stage
in 24 seconds
......@@ -5,7 +5,7 @@ location=$2
user=$3
password=$4
token=$5
install_cli=$6
install_cli=$6 # not used
name=$7
if [[ $location != "None" ]];then
......@@ -18,7 +18,7 @@ mkdir "./$archive_dir"
cd "./$archive_dir"
options="-O -J -L"
if [[ $token != "None" ]]; then
if [[ -n "$token" ]]; then
curl "Authorization: Bearer $token" $options $url
else
if [[ $user != "None" ]] && [[ $password != "None" ]];then
......@@ -39,7 +39,7 @@ rm $archive
package=`ls`
if [[ $name != "" ]] && [[ $name != $package ]]; then
if [[ -n "$name" ]] && [[ $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