From 02aa787eab12743d33c7c8f7c480e4e54f1696d7 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Tue, 2 Oct 2012 17:59:59 +0000 Subject: [PATCH] No longer always installing as an executable file by default --- doc/scripts/subst.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/doc/scripts/subst.sh b/doc/scripts/subst.sh index 3b70b44..5c8c9d6 100755 --- a/doc/scripts/subst.sh +++ b/doc/scripts/subst.sh @@ -21,7 +21,7 @@ PREFIX="/usr/local" CHMOD="chmod" DEBUG="_debug" DEVNULL="/dev/null" -INSTALL="install -m 0755" +INSTALL="install" MKDIR="mkdir -m 0755 -p" RM="rm -f" SED="sed" @@ -86,7 +86,10 @@ while [ $# -gt 0 ]; do #install if [ "$install" -eq 1 ]; then $DEBUG $MKDIR -- "$BINDIR" || exit 2 - $DEBUG $INSTALL "$target" "$BINDIR/$target" || exit 2 + mode="-m 0644" + [ -x "$target.in" ] && mode="-m 0755" + $DEBUG $INSTALL $mode "$target" "$BINDIR/$target" \ + || exit 2 continue fi