diff --git a/deploy-npm b/deploy-npm index fa056c9..e248cbf 100755 --- a/deploy-npm +++ b/deploy-npm @@ -2,10 +2,10 @@ # Usage: deploy-npm [--delete-target] target if [ "$1" == "--delete-target" ]; then - delete_target=1 + delete_target=true dst_dir="$2" else - delete-target=0 + delete_target=false dst_dir="$1" fi @@ -36,7 +36,7 @@ cd "$tmp_dir" || exit npm ci npm run deploy -if [ $delete_target -eq 1 ]; then +if [ "$delete_target" = true ]; then echo "[[ Deploy ]] Deleting then recreating '$dst_dir'." rm -rf "${dst_dir:?}/**" chmod g+w "$dst_dir" diff --git a/deploy-static b/deploy-static index d642218..9435a20 100755 --- a/deploy-static +++ b/deploy-static @@ -2,10 +2,10 @@ # Usage: deploy-static [--delete-target] target if [ "$1" == "--delete-target" ]; then - delete_target=1 + delete_target=true dst_dir="$2" else - delete-target=0 + delete_target=false dst_dir="$1" fi @@ -32,7 +32,7 @@ echo "[[ Deploy ]] Cloning repository at '$repo_dir' into '$tmp_dir'." git clone "$repo_dir" "$tmp_dir" rm -rf "$tmp_dir/.git/" -if [ $delete_target -eq 1 ]; then +if [ "$delete_target" = true ]; then echo "[[ Deploy ]] Deleting then recreating '$dst_dir'." rm -rf "${dst_dir:?}/**" chmod g+w "$dst_dir"