From ea0bea3c94c448bffbcc89748ab3e2f5e8457bdf Mon Sep 17 00:00:00 2001 From: Bryan Joshua Pedini Date: Sun, 18 Sep 2022 18:12:06 +0200 Subject: [PATCH] fixed home expansion in bash quotes, added brackets on $2 fuck you bash! --- deploy.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deploy.sh b/deploy.sh index 9787a55..41f491d 100755 --- a/deploy.sh +++ b/deploy.sh @@ -2,14 +2,14 @@ set -e # Check for the source server (with default) -DEPLOY_SOURCE_FILE="~/.deploy_source" +DEPLOY_SOURCE_FILE="${HOME}/.deploy_source" DEPLOY_SOURCE="https://git.bjphoster.com/deployments" if [ -f "${DEPLOY_SOURCE_FILE}" ]; then . "${DEPLOY_SOURCE_FILE}" fi # Check for the deploy position (with default) -DEPLOY_DESTINATION_FILE="~/.deploy_destination" +DEPLOY_DESTINATION_FILE="${HOME}/.deploy_destination" DEPLOY_DESTINATION="/opt" if [ -f "${DEPLOY_DESTINATION_FILE}" ]; then . "${DEPLOY_DESTINATION_FILE}" @@ -26,4 +26,4 @@ if [ $# -ne 2 ]; then fi echo "deploying ..." -git clone "${DEPLOY_SOURCE}/${1}" "${DEPLOY_DESTINATION}/$2" +git clone "${DEPLOY_SOURCE}/${1}" "${DEPLOY_DESTINATION}/${2}"