pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/bulk Add a --without-x flag to the mksandbox script.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/9f903c2aa948
branches:  trunk
changeset: 539045:9f903c2aa948
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Tue Feb 26 05:06:32 2008 +0000

description:
Add a --without-x flag to the mksandbox script.

diffstat:

 mk/bulk/mksandbox |  12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diffs (56 lines):

diff -r 581663cd0f53 -r 9f903c2aa948 mk/bulk/mksandbox
--- a/mk/bulk/mksandbox Mon Feb 25 23:15:06 2008 +0000
+++ b/mk/bulk/mksandbox Tue Feb 26 05:06:32 2008 +0000
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-# $NetBSD: mksandbox,v 1.47 2008/01/04 15:49:07 rillig Exp $
+# $NetBSD: mksandbox,v 1.48 2008/02/26 05:06:32 jlam Exp $
 #
 #
 # Copyright (c) 2002 Alistair G. Crooks.  All rights reserved.
@@ -34,7 +34,7 @@
 # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #
 
-# Usage: mksandbox [--pkgsrc=dir] [--src=srcdir] [--xsrc=xsrcdir] [--verbose] sandbox-dir
+# Usage: mksandbox [--pkgsrc=dir] [--src=srcdir] [--xsrc=xsrcdir] [--without-x] [--verbose] sandbox-dir
 #
 # A small shell script to set up a sandbox (usually for a pkgsrc bulk
 # build), using null mounts.
@@ -42,6 +42,7 @@
 pkgsrc=/usr/pkgsrc
 src=/usr/src
 xsrc=/usr/xsrc
+with_x=yes
 
 kernel=""
 sandboxMountDirs="/bin /sbin /lib /libexec /usr/X11R6 /usr/bin /usr/games /usr/include /usr/lib /usr/libdata /usr/libexec /usr/lkm /usr/share /usr/sbin /var/mail"
@@ -50,7 +51,7 @@
 
 usage()
 {
-       echo "Usage: mksandbox [--pkgsrc=dir] [--src=srcdir] [--xsrc=xsrcdir] [--verbose] sandbox-dir"
+       echo "Usage: mksandbox [--pkgsrc=dir] [--src=srcdir] [--xsrc=xsrcdir] [--without-x] [--verbose] sandbox-dir"
        exit 1
 }
 
@@ -154,6 +155,7 @@
        --pkgsrc=*)     pkgsrc=`echo $1 | $sedprog -e 's|^--pkgsrc=||'` ;;
        --src=*)        src=`echo $1 | $sedprog -e 's|^--src=||'` ;;
        --xsrc=*)       xsrc=`echo $1 | $sedprog -e 's|^--xsrc=||'` ;;
+       --without-x)    with_x=no ;;
        --verbose)      set -x ;;
        -*)             usage ;;
        *)              break ;;
@@ -165,6 +167,10 @@
        usage
 fi
 
+if [ "$with_x" = "no"; then
+       need_xsrc=no
+fi
+
 if [ `$idprog -u` -ne 0 ]; then
        err "You must be root to run this script."
 fi



Home | Main Index | Thread Index | Old Index