aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Piotr Jaroszyński <peper@gentoo.org> 2007-05-18 16:12:09 +0000
committerAvatar Piotr Jaroszyński <peper@gentoo.org> 2007-05-18 16:12:09 +0000
commitcef92c0ae2d47d9e34b08e2c7981f71e0d5bdf18 (patch)
tree4a2bfbeab03e89517b2e7f43b61dc5cde5d18e01
parent0b8cee077e47509a4c5ca47c3f32fefaf88266e5 (diff)
downloadpaludis-cef92c0ae2d47d9e34b08e2c7981f71e0d5bdf18.tar.gz
paludis-cef92c0ae2d47d9e34b08e2c7981f71e0d5bdf18.tar.xz
Quote readlink's args.
-rwxr-xr-xhooks/fix_symlinks.bash8
1 files changed, 4 insertions, 4 deletions
diff --git a/hooks/fix_symlinks.bash b/hooks/fix_symlinks.bash
index d6a4536..fadc6fb 100755
--- a/hooks/fix_symlinks.bash
+++ b/hooks/fix_symlinks.bash
@@ -26,20 +26,20 @@ image=$(tr -s / <<<"${IMAGE}" )
case "${HOOK}" in
merger_check_sym_post)
- target=$(readlink ${INSTALL_SOURCE} | tr -s / )
+ target=$(readlink "${INSTALL_SOURCE}" | tr -s / )
[[ "${target#${image}}" == "${target}" ]] && exit 0
- ewarn "Bad symlink ${INSTALL_SOURCE} -> $(readlink ${INSTALL_SOURCE} ) will be rewritten"
+ ewarn "Bad symlink ${INSTALL_SOURCE} -> $(readlink "${INSTALL_SOURCE}" ) will be rewritten"
;;
merger_install_sym_post)
- target=$(readlink ${INSTALL_DESTINATION} | tr -s / )
+ target=$(readlink "${INSTALL_DESTINATION}" | tr -s / )
[[ "${target#${image}}" == "${target}" ]] && exit 0
new_target=${target#${image}}
new_target=/${new_target##+(/)}
ewarn "Relinking bad symlink ${INSTALL_DESTINATION} -> $(readlink \
- ${INSTALL_DESTINATION} ) to ${new_target}"
+ "${INSTALL_DESTINATION}" ) to ${new_target}"
echo rm -f "${INSTALL_DESTINATION}" 1>&2
rm -f "${INSTALL_DESTINATION}"
echo ln -s "${new_target}" "${INSTALL_DESTINATION}" 1>&2