diff --git a/doc/scripts/subst.sh b/doc/scripts/subst.sh index 30320e1..87e79c8 100755 --- a/doc/scripts/subst.sh +++ b/doc/scripts/subst.sh @@ -150,15 +150,18 @@ while [ $# -gt 0 ]; do #install if [ "$install" -eq 1 ]; then + source="${target#$OBJDIR}" $DEBUG $MKDIR -- "$PREFIX" || exit 2 mode="-m 0644" - [ -x "$target" ] && mode="-m 0755" - $DEBUG $INSTALL $mode "$target" "$PREFIX/$target" \ + [ -x "${source}.in" ] && mode="-m 0755" + $DEBUG $INSTALL $mode "$target" "$PREFIX/$source" \ || exit 2 continue fi #create + source="${target#$OBJDIR}" + source="${source}.in" $DEBUG $SED -e "s,@PACKAGE@,$PACKAGE,g" \ -e "s,@VERSION@,$VERSION,g" \ -e "s,@PREFIX@,$PREFIX,g" \ @@ -171,11 +174,11 @@ while [ $# -gt 0 ]; do -e "s,@MANDIR@,$MANDIR,g" \ -e "s,@SYSCONFDIR@,$SYSCONFDIR,g" \ -e "s,@PWD@,$PWD,g" \ - -- "$target.in" > "$target" + -- "$source" > "$target" if [ $? -ne 0 ]; then $RM -- "$target" 2> "$DEVNULL" exit 2 - elif [ -x "$target.in" ]; then + elif [ -x "$source" ]; then $DEBUG $CHMOD 0755 "$target" fi done