shellcheck

This commit is contained in:
Michael Vines 2020-06-12 16:06:32 -07:00
parent b54532b4c1
commit 644e37c03e
2 changed files with 6 additions and 6 deletions

View File

@ -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

View File

@ -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"