Make PREFIX work under Cygwin

This commit is contained in:
Tom Eastep 2009-07-25 07:30:08 -07:00
parent c028fefa30
commit eed9df1c06
4 changed files with 35 additions and 22 deletions

View File

@ -156,10 +156,12 @@ if [ -n "$PREFIX" ]; then
echo "Not setting file owner/group permissions, not running as root." echo "Not setting file owner/group permissions, not running as root."
OWNERSHIP="" OWNERSHIP=""
fi fi
fi
install -d $OWNERSHIP -m 755 ${PREFIX}/sbin install -d $OWNERSHIP -m 755 ${PREFIX}/sbin
install -d $OWNERSHIP -m 755 ${PREFIX}${DEST} install -d $OWNERSHIP -m 755 ${PREFIX}${DEST}
fi
CYGWIN=
else else
if [ -z "$CYGWIN" ]; then if [ -z "$CYGWIN" ]; then
if [ -d /etc/apt -a -e /usr/bin/dpkg ]; then if [ -d /etc/apt -a -e /usr/bin/dpkg ]; then
@ -732,6 +734,7 @@ for f in prog.* ; do
echo "Program skeleton file ${f#*.} installed as ${PREFIX}/usr/share/shorewall/$f" echo "Program skeleton file ${f#*.} installed as ${PREFIX}/usr/share/shorewall/$f"
done done
pwd
cd .. cd ..
# #
# Create the version file # Create the version file
@ -751,6 +754,7 @@ fi
# Install the Man Pages # Install the Man Pages
# #
pwd
cd manpages cd manpages
for f in *.5; do for f in *.5; do

View File

@ -107,14 +107,6 @@ if [ -z "$RUNLEVELS" ] ; then
RUNLEVELS="" RUNLEVELS=""
fi fi
if [ -z "$OWNER" ] ; then
OWNER=root
fi
if [ -z "$GROUP" ] ; then
GROUP=root
fi
while [ $# -gt 0 ] ; do while [ $# -gt 0 ] ; do
case "$1" in case "$1" in
-h|help|?) -h|help|?)
@ -139,6 +131,19 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin
# #
DEBIAN= DEBIAN=
case $(uname) in
CYGWIN*)
DEST=
INIT=
OWNER=$(id -un)
GROUP=$(id -gn)
;;
*)
[ -z "$OWNER" ] && OWNER=root
[ -z "$GROUP" ] && GROUP=root
;;
esac
OWNERSHIP="-o $OWNER -g $GROUP" OWNERSHIP="-o $OWNER -g $GROUP"
if [ -n "$PREFIX" ]; then if [ -n "$PREFIX" ]; then

View File

@ -156,10 +156,12 @@ if [ -n "$PREFIX" ]; then
echo "Not setting file owner/group permissions, not running as root." echo "Not setting file owner/group permissions, not running as root."
OWNERSHIP="" OWNERSHIP=""
fi fi
fi
install -d $OWNERSHIP -m 755 ${PREFIX}/sbin install -d $OWNERSHIP -m 755 ${PREFIX}/sbin
install -d $OWNERSHIP -m 755 ${PREFIX}${DEST} install -d $OWNERSHIP -m 755 ${PREFIX}${DEST}
fi
CYGWIN=
else else
[ -x /usr/share/shorewall/compiler.pl ] || \ [ -x /usr/share/shorewall/compiler.pl ] || \
{ echo " ERROR: Shorewall >= 4.3.5 is not installed" >&2; exit 1; } { echo " ERROR: Shorewall >= 4.3.5 is not installed" >&2; exit 1; }

View File

@ -244,7 +244,9 @@ do_manpages()
;; ;;
esac esac
done done
rm *.xml
rm -f *.xml
rm -f *.bak
} }
################################################################################ ################################################################################