No longer hardcore the target directory as being BINDIR

This commit is contained in:
Pierre Pronchery 2012-10-02 18:09:33 +00:00
parent 0f4e6fa428
commit 554c94fc72

View File

@ -72,23 +72,22 @@ if [ $# -eq 0 ]; then
exit $? exit $?
fi fi
BINDIR="$PREFIX/bin"
while [ $# -gt 0 ]; do while [ $# -gt 0 ]; do
target="$1" target="$1"
shift shift
#uninstall #uninstall
if [ "$uninstall" -eq 1 ]; then if [ "$uninstall" -eq 1 ]; then
$DEBUG $RM -- "$BINDIR/$target" || exit 2 $DEBUG $RM -- "$PREFIX/$target" || exit 2
continue continue
fi fi
#install #install
if [ "$install" -eq 1 ]; then if [ "$install" -eq 1 ]; then
$DEBUG $MKDIR -- "$BINDIR" || exit 2 $DEBUG $MKDIR -- "$PREFIX" || exit 2
mode="-m 0644" mode="-m 0644"
[ -x "$target" ] && mode="-m 0755" [ -x "$target" ] && mode="-m 0755"
$DEBUG $INSTALL $mode "$target" "$BINDIR/$target" \ $DEBUG $INSTALL $mode "$target" "$PREFIX/$target" \
|| exit 2 || exit 2
continue continue
fi fi