#!/bin/sh
#
# Copyright 2005-2006 Timo Hirvonen
#
# This file is licensed under the GPLv2.

flags=""
while test $# -gt 0
do
	case $1 in
		-*)
			flags="$flags $1"
			;;
		*)
			break
			;;
	esac
	shift
done

test $# -lt 2 && exit 0

to="${DESTDIR}${1}"
shift
$GINSTALL -d -m755 "${to}"
for i in "$@"
do
	dest="${to}/`basename ${i}`"
	test "$INSTALL_LOG" && echo "$dest" >> "$INSTALL_LOG"
	echo "INSTALL ${dest}"
	$GINSTALL $flags "$i" "${to}"
done
