#!/bin/bash
TOPDIR="$(cd $(dirname $(which $0)); pwd)"
-echo "TOP: $TOPDIR"
TMP_CONF="$(mktemp)"
PKGMK=$TOPDIR/src/pkgmk
PKGMK_OPTIMIZE=""
while [ "$1" ]; do
- echo "arg: $1"
- case $1 in
- -o) PKGMK_OPTIMIZE="$2" ;;
- *) PKGMK_ARGS="$PKGMK_ARGS $1" ;;
- esac
+ if [ "$1" != "-o" ]; then
+ PKGMK_ARGS="$PKGMK_ARGS $1"
+ else
+ shift
+ PKGMK_OPTIMIZE="$1"
+ fi
shift
done
fi
fi
-echo "$PKGMK -cf $PKGMK_CONF $PKGMK_ARGS"
+$PKGMK -cf $PKGMK_CONF $PKGMK_ARGS
-#rm -f $TMP_CONF
+rm -f $TMP_CONF
# End of file