diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2017-04-20 21:50:58 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2017-04-20 22:56:14 -0400 |
commit | d958a33c1f0e11b770481a9188cbf75cc3bfd0a5 (patch) | |
tree | b5ae47096365863eb26a77a89af0e36b48b5ca03 /src/abslibre-tools/diff-unfree | |
parent | 2d1ae58285ade402260bf5d5a4dbf42aba027fc5 (diff) |
Quote unquoted strings that should probably be quoted.
These were found with the help of shellcheck.
Nothing more complicated than wrapping a variable in double quotes has been
done.
Diffstat (limited to 'src/abslibre-tools/diff-unfree')
-rwxr-xr-x | src/abslibre-tools/diff-unfree | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/abslibre-tools/diff-unfree b/src/abslibre-tools/diff-unfree index 15fd197..3670f7f 100755 --- a/src/abslibre-tools/diff-unfree +++ b/src/abslibre-tools/diff-unfree @@ -4,6 +4,7 @@ # Copyright (C) 2010-2011 Nicolás Reynolds <fauno@parabola.nu> # Copyright (C) 2011 Joshua Ismael Haase Hernández (xihh) <hahj87@gmail.com> +# Copyright (C) 2017 Luke Shumaker <lukeshu@sbcglobal.net> # # License: GNU GPLv3+ # @@ -41,8 +42,9 @@ main() { exit 0 fi + local package_guess=${PWD##*/} - local repo=${1:-$(basename ${PWD%/*})} + local repo=${1:-$(basename "${PWD%/*}")} local package=${2:-${package_guess%-libre}} local trunk=${3:-trunk} @@ -59,7 +61,7 @@ main() { fi - tmp_dir="$(mktemp --tmpdir -d ${package}.XXXXXX)" + tmp_dir="$(mktemp --tmpdir -d "${package}.XXXXXX")" if [[ ! -d "${tmp_dir}" ]]; then error "Can't create temp dir" exit 1 @@ -70,19 +72,19 @@ main() { msg "Getting diff from %s..." "$repo/$package" - svn checkout --depth=empty svn://svn.archlinux.org/$svnrepo &>/dev/null + svn checkout --depth=empty "svn://svn.archlinux.org/$svnrepo" &>/dev/null - cd ${svnrepo} - svn update ${package} + cd "${svnrepo}" + svn update "${package}" # Back to start dir popd &>/dev/null msg "Diffing files" - for _file in ${unfree_dir}/*; do + for _file in "${unfree_dir}"/*; do msg2 "%s" "$(basename "${_file}")" - ${DIFFPROG} "$PWD/$(basename "${_file}")" "${_file}" + "${DIFFPROG}" "$PWD/$(basename "${_file}")" "${_file}" done } |