diff --git a/.travis/affects.sh b/.travis/affects.sh index ca87b5bc4df44e..246c56fe0e8c52 100755 --- a/.travis/affects.sh +++ b/.travis/affects.sh @@ -5,10 +5,10 @@ ( set -x - git diff --name-only $TRAVIS_COMMIT_RANGE + git diff --name-only "$TRAVIS_COMMIT_RANGE" ) -for file in $(git diff --name-only $TRAVIS_COMMIT_RANGE); do +for file in $(git diff --name-only "$TRAVIS_COMMIT_RANGE"); do if [[ $file =~ ^"$1" ]]; then exit 0 fi diff --git a/.travis/export-github-repo.sh b/.travis/export-github-repo.sh index 48a70ab0baafe4..4a74aaec6d2116 100755 --- a/.travis/export-github-repo.sh +++ b/.travis/export-github-repo.sh @@ -16,11 +16,11 @@ pip3 install git-filter-repo declare subdir=$1 declare repo_name=$2 -[[ -n $subdir ]] || { +[[ -n "$subdir" ]] || { echo "Error: subdir not specified" exit 1 } -[[ -n $repo_name ]] || { +[[ -n "$repo_name" ]] || { echo "Error: repo_name not specified" exit 1 } @@ -30,9 +30,9 @@ echo "Exporting $subdir" set -x rm -rf .github_export/"$repo_name" -git clone https://${GITHUB_TOKEN}@github.com/solana-labs/"$repo_name" .github_export/"$repo_name" +git clone https://"$GITHUB_TOKEN"@github.com/solana-labs/"$repo_name" .github_export/"$repo_name" # TODO: Try using `--refs $TRAVIS_COMMIT_RANGE` to speed up the filtering git filter-repo --subdirectory-filter "$subdir" --target .github_export/"$repo_name" -git -C .github_export/"$repo_name" push https://${GITHUB_TOKEN}@github.com/solana-labs/"$repo_name" +git -C .github_export/"$repo_name" push https://"$GITHUB_TOKEN"@github.com/solana-labs/"$repo_name"