Skip to content

Commit

Permalink
Update bosh lite pool scripts to work on ZSH (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerg authored Aug 31, 2022
1 parent 4f7475a commit 328dae5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/claim-bosh-lite.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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}"
Expand Down
5 changes: 3 additions & 2 deletions lib/unclaim-bosh-lite.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 328dae5

Please sign in to comment.