diff --git a/lib/claim-bosh-lite.bash b/lib/claim-bosh-lite.bash index 3044b17..ac0be7f 100755 --- a/lib/claim-bosh-lite.bash +++ b/lib/claim-bosh-lite.bash @@ -97,7 +97,7 @@ function claim_bosh_lite() { file=`find . -name $env` - if [ "$file" == "" ]; then + if [[ "$file" == "" ]]; then echo $env does not exist return 1 fi @@ -212,7 +212,7 @@ EOF echo "$PWD/$(basename "${env_file}")" ) - if [ "$?" == 0 ]; then + if [[ "$?" == 0 ]]; then direnv allow "${env_dir}" echo "Changing directory to '${env_dir}'..." cd "${env_dir}" diff --git a/lib/unclaim-bosh-lite.bash b/lib/unclaim-bosh-lite.bash index d859db8..ae4ba20 100755 --- a/lib/unclaim-bosh-lite.bash +++ b/lib/unclaim-bosh-lite.bash @@ -32,12 +32,13 @@ function unclaim_bosh_lite() { env=$1 file="$(find "${working_pool}" -name "${env}")" - if [ "$file" == "" ]; then + if [[ "$file" == "" ]]; then echo "$env does not exist in ${working_pool}" return 1 fi - read -r -p "Hit enter to release ${env} " + printf "Hit enter to release ${env} " + read -r git mv "${file}" "${broken_pool}/unclaimed/" if [ -d "${env}" ]; then