add '-l logdir' to build-g11n-spec.sh - used in jffmake to put logs to NFS work dir
--- a/build-g11n-spec.sh Fri May 06 13:54:33 2011 +0200
+++ b/build-g11n-spec.sh Tue May 10 16:58:10 2011 +0200
@@ -6,9 +6,10 @@
# ln -s /opt/dtbld /opt/pkgbuild
# Build IM pkgs
-usage="$(basename $0) [-d <topdir>] [-p] [-b] [-n] [spec files...]"
+usage="$(basename $0) [-d <topdir>] [-l <logdir>] [-p] [-b] [-n] [spec files...]"
usage="$usage\nDefault build type is 'build-only'"
usage="$usage\n -d <topdir>: specify another top dir."
+usage="$usage\n -l <logdir>: specify another dir for build logs"
usage="$usage\n -p : source prep only."
usage="$usage\n -a : uninstall/build/install."
usage="$usage\n -n : NOT compress/copy to $HOME/packages\n"
@@ -30,16 +31,17 @@
[ -z "$PUBLISHER" ] || echo "export PUBLISHER=$PUBLISHER" >> /tmp/.build_env.$$
[ -z "$DOWNLOADS" ] || echo "export DOWNLOADS=$DOWNLOADS" >> /tmp/.build_env.$$
-source /opt/jdsbld/bin/env.sh
+source /opt/jdsbld/bin/env.sh default
. /tmp/.build_env.$$
-while getopts pad:n option
+while getopts pad:l:n option
do
case $option in
p) FLAGPREP=1;;
a) FLAGALL=1;;
d) TOPDIR="$OPTARG";;
+ l) LOGDIR="$OPTARG";;
n) NOTCPFLAG=1;;
?) printf "$usage" ; exit ;;
esac
@@ -56,7 +58,12 @@
MACH="${MACH:-`uname -p`}"
BLDDIR="$TOPDIR/build.$MACH"
-mkdir -p $BLDDIR/log
+
+if [ X$LOGDIR = X ]; then
+ LOGDIR="$BLDDIR/log"
+fi
+
+mkdir -p "$LOGDIR"
# set the http and ftp proxies if you are behind a firewall
# export http_proxy=
@@ -141,7 +148,7 @@
PKGBUILDARGS="$PKGBUILDARGS --pkgformat=filesystem"
fi
PKGBUILDARGS="$PKGBUILDARGS --sourcedirs=$SRCDIRS --patchdirs=$PATCHDIRS"
- PKGBUILDARGS="$PKGBUILDARGS --logdir=$BLDDIR/log"
+ PKGBUILDARGS="$PKGBUILDARGS --logdir=$LOGDIR"
PKGBUILDARGS="$PKGBUILDARGS --halt-on-errors"
[[ -z "$DOWNLOADS" ]] || PKGBUILDARGS+=" --tar=$DOWNLOADS"