From 13a1d5883c9aa81ee10d61cbe4c2f2223dad9a50 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 14 Feb 2012 10:11:43 -0600 Subject: scripts: unset CDPATH if cd is used This wonderful/awful little bash shell variable wrecks havoc on `cd` calls in shell scripts. Unset CDPATH in makepkg where we use `cd` quite heavily. In pacman-optimize, we can move the change directory logic into the bsdtar call so we are left with no usages of `cd` in the script. Signed-off-by: Dan McGee --- scripts/makepkg.sh.in | 2 ++ 1 file changed, 2 insertions(+) (limited to 'scripts/makepkg.sh.in') diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 80bb1c94..5e8687e7 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -36,6 +36,8 @@ export TEXTDOMAINDIR='@localedir@' # file -i does not work on Mac OSX unless legacy mode is set export COMMAND_MODE='legacy' +# Ensure CDPATH doesn't screw with our cd calls +unset CDPATH myver='@PACKAGE_VERSION@' confdir='@sysconfdir@' -- cgit v1.2.3-24-g4f1b