Use {} in the variable expansion

This commit is contained in:
Carles Pina i Estany 2022-01-21 17:42:11 +01:00
parent 084156bc22
commit 483689a71c

View File

@ -4,17 +4,17 @@ set -e # if a command fails it stops the execution
set -u # script fails if trying to access to an undefined variable set -u # script fails if trying to access to an undefined variable
echo "[+] Action start" echo "[+] Action start"
SOURCE_BEFORE_DIRECTORY="$1" SOURCE_BEFORE_DIRECTORY="${1}"
SOURCE_DIRECTORY="$2" SOURCE_DIRECTORY="${2}"
DESTINATION_GITHUB_USERNAME="$3" DESTINATION_GITHUB_USERNAME="${3}"
DESTINATION_REPOSITORY_NAME="$4" DESTINATION_REPOSITORY_NAME="${4}"
GITHUB_SERVER="$5" GITHUB_SERVER="${5}"
USER_EMAIL="$6" USER_EMAIL="${6}"
USER_NAME="$7" USER_NAME="${7}"
DESTINATION_REPOSITORY_USERNAME="$8" DESTINATION_REPOSITORY_USERNAME="${8}"
TARGET_BRANCH="$9" TARGET_BRANCH="${9}"
COMMIT_MESSAGE="$10" COMMIT_MESSAGE="${10}"
TARGET_DIRECTORY="$11" TARGET_DIRECTORY="${11}"
if [ -z "$DESTINATION_REPOSITORY_USERNAME" ] if [ -z "$DESTINATION_REPOSITORY_USERNAME" ]
then then