summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2007-07-26 08:58:08 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2007-07-26 08:58:08 +0000
commitab3c63ff9b9d0b0dbbf1e69a50ef366cbfe64c94 (patch)
tree8e4b205042aa75fc59d1519ed005ddc801728f19
parent303a089a8e3402d3d38e8d0b2b424c2ee93e06e7 (diff)
downloadzsh-ab3c63ff9b9d0b0dbbf1e69a50ef366cbfe64c94.tar.gz
zsh-ab3c63ff9b9d0b0dbbf1e69a50ef366cbfe64c94.zip
23702: fix installing executable scripts
23703: getenv() should be zgetenv()
-rw-r--r--ChangeLog7
-rwxr-xr-xConfig/installfns.sh5
-rw-r--r--Src/init.c2
3 files changed, 10 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index ee861b044..951ede886 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-07-26 Peter Stephenson <pws@csr.com>
+
+ * 23703: Src/init.c: getenv() should be zgetenv().
+
+ * 23702: Config/installfns.sh: use chmod to change permissions
+ since installing as a programme may try to strip the script.
+
2007-07-25 Clint Adams <clint@zsh.org>
* 23697: configure.ac: use -rdynamic where it seems to be
diff --git a/Config/installfns.sh b/Config/installfns.sh
index 68ffa4c6d..c28c8e7df 100755
--- a/Config/installfns.sh
+++ b/Config/installfns.sh
@@ -45,10 +45,9 @@ for file in $allfuncs; do
esac
fi
test -d $instdir || /bin/sh $sdir_top/mkinstalldirs $instdir || exit 1
+ $INSTALL_DATA $sdir_top/$file $instdir || exit 1
if test -x $sdir_top/$file; then
- $INSTALL_PROGRAM $sdir_top/$file $instdir || exit 1
- else
- $INSTALL_DATA $sdir_top/$file $instdir || exit 1
+ chmod +x $instdir/`echo $file | sed -e 's%^.*/%%'`
fi
fi
done
diff --git a/Src/init.c b/Src/init.c
index e885c79b6..980d3b1c9 100644
--- a/Src/init.c
+++ b/Src/init.c
@@ -832,7 +832,7 @@ setupvals(void)
if (emulation == EMULATE_ZSH)
ptr = home;
else
- ptr = getenv("HOME");
+ ptr = zgetenv("HOME");
if (ptr && ispwd(ptr))
pwd = ztrdup(ptr);
else if ((ptr = zgetenv("PWD")) && (strlen(ptr) < PATH_MAX) &&