Skip to content

Commit

Permalink
Double quote variables in shellscript
Browse files Browse the repository at this point in the history
This will help prevent globbing and word splitting. Most of them are
already quoted, just few of them are missed.
  • Loading branch information
PeterDaveHello committed Jun 16, 2021
1 parent 5f53c97 commit a59d52a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dep/helpers/build
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ if [ ! -d "$install_dir/bin" ]; then
fi

helpers_dir="$(dirname "${BASH_SOURCE[0]}")"
cd $helpers_dir
cd "$helpers_dir"

os="$(uname -s | tr '[:upper:]' '[:lower:]')"
echo "building $install_dir/bin/helper"
Expand Down
2 changes: 1 addition & 1 deletion go_modules/helpers/build
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ if [ ! -d "$install_dir/bin" ]; then
fi

helpers_dir="$(dirname "${BASH_SOURCE[0]}")"
cd $helpers_dir
cd "$helpers_dir"

os="$(uname -s | tr '[:upper:]' '[:lower:]')"
echo "building $install_dir/bin/helper"
Expand Down
8 changes: 4 additions & 4 deletions hex/helpers/build
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if [ -z "$install_dir" ]; then
exit 1
fi

mkdir -p $install_dir
mkdir -p "$install_dir"

mix local.hex --force
mix archive.install hex nerves_bootstrap --force
Expand All @@ -20,9 +20,9 @@ case `uname` in
*) CP_OPTS='-r' ;;
esac

cp $CP_OPTS "$helpers_dir/lib" $install_dir
cp $CP_OPTS "$helpers_dir/mix.exs" $install_dir
cp $CP_OPTS "$helpers_dir/mix.lock" $install_dir
cp $CP_OPTS "$helpers_dir/lib" "$install_dir"
cp $CP_OPTS "$helpers_dir/mix.exs" "$install_dir"
cp $CP_OPTS "$helpers_dir/mix.lock" "$install_dir"

cd "$install_dir"
mix deps.get

0 comments on commit a59d52a

Please sign in to comment.