summaryrefslogtreecommitdiffstats
path: root/scripts/makepkg.sh.in
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-02-14 17:11:43 +0100
committerDan McGee <dan@archlinux.org>2012-02-14 17:11:43 +0100
commit13a1d5883c9aa81ee10d61cbe4c2f2223dad9a50 (patch)
tree6f0af4989d98bbb3d5053a17199081ae05d51236 /scripts/makepkg.sh.in
parentb4f5a63e7fee5d04949e290bd63e5f0e94bd211e (diff)
downloadpacman-13a1d5883c9aa81ee10d61cbe4c2f2223dad9a50.tar.gz
pacman-13a1d5883c9aa81ee10d61cbe4c2f2223dad9a50.tar.xz
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 <dan@archlinux.org>
Diffstat (limited to 'scripts/makepkg.sh.in')
-rw-r--r--scripts/makepkg.sh.in2
1 files changed, 2 insertions, 0 deletions
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@'