Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/get-package-updates
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-06-28 23:32:12 +0200
committerErich Eckner <git@eckner.net>2017-06-28 23:32:12 +0200
commitc6984b98277071bd0e2830adaac7e5925ed4130c (patch)
treee715035227c9748df1415e717210a5f1edd8820e /bin/get-package-updates
parentcdb3bcea206a7397686921ddacd50c1a39e42cd2 (diff)
properly escape eval expressions
Diffstat (limited to 'bin/get-package-updates')
-rwxr-xr-xbin/get-package-updates12
1 files changed, 6 insertions, 6 deletions
diff --git a/bin/get-package-updates b/bin/get-package-updates
index 77819e6..e096eff 100755
--- a/bin/get-package-updates
+++ b/bin/get-package-updates
@@ -88,7 +88,7 @@ delete_package() {
# Update git repositories (official packages, community packages and the repository of package customizations).
for repo in ${repo_names}; do
- eval repo_path='$repo_paths__'"${repo}"
+ eval repo_path='"${repo_paths__'"${repo}"'}"'
# TODO:
# this is somewhat redundant and slow -- improve it!
git -C "${repo_path}" checkout -f master
@@ -106,7 +106,7 @@ for repo in ${repo_names}; do
cat "${work_dir}/${repo}.revision" 2> /dev/null || \
echo NONE
)'"
- eval repo_path='$repo_paths__'"${repo}"
+ eval repo_path='"${repo_paths__'"${repo}"'}"'
eval "new_repo_revisions__${repo}='$(
git -C "${repo_path}" rev-parse HEAD | \
tee "${work_dir}/${repo}.revision.new"
@@ -137,9 +137,9 @@ cp \
"${work_dir}/deletion-list.new"
for repo in ${repo_names}; do
- eval repo_path='$repo_paths__'"${repo}"
- eval old_repo_revision='$old_repo_revisions__'"${repo}"
- eval new_repo_revision='$new_repo_revisions__'"${repo}"
+ eval repo_path='"${repo_paths__'"${repo}"'}"'
+ eval old_repo_revision='"${old_repo_revisions__'"${repo}"'}"'
+ eval new_repo_revision='"${new_repo_revisions__'"${repo}"'}"'
(
# if old revision unknown, mimic "git diff"-output
if [ "${old_repo_revision}" = "NONE" ]; then
@@ -158,7 +158,7 @@ for repo in ${repo_names}; do
sed 's|^\(.\t\)\([^/]\+\)/\([^/]\+\)/\(.\+\)$|\2 \1\3/repos/\2-x86_64/\4|' | \
while read -r pkg_repo rest; do
eval "printf '%s %s\n'" \
- "$(printf '"$new_repo_revisions__%s"' "$(find_git_repository_to_package_repository "${pkg_repo}")")" \
+ "$(printf '"${new_repo_revisions__%s}"' "$(find_git_repository_to_package_repository "${pkg_repo}")")" \
"'${rest}'"
done
else