pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk/bulk if an unknown option is given, don't treat it ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/c631e06c15d8
branches: trunk
changeset: 467366:c631e06c15d8
user: grant <grant%pkgsrc.org@localhost>
date: Fri Jan 30 08:34:28 2004 +0000
description:
if an unknown option is given, don't treat it as a sandbox
directory, print the usage message instead.
diffstat:
mk/bulk/mksandbox | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diffs (41 lines):
diff -r 095c053b5486 -r c631e06c15d8 mk/bulk/mksandbox
--- a/mk/bulk/mksandbox Fri Jan 30 07:05:27 2004 +0000
+++ b/mk/bulk/mksandbox Fri Jan 30 08:34:28 2004 +0000
@@ -1,6 +1,6 @@
#! /bin/sh
-# $NetBSD: mksandbox,v 1.28 2004/01/26 22:32:30 grant Exp $
+# $NetBSD: mksandbox,v 1.29 2004/01/30 08:34:28 grant Exp $
#
#
# Copyright (c) 2002 Alistair G. Crooks. All rights reserved.
@@ -47,6 +47,12 @@
sandboxEmptyDirs="/var/run /var/log /var/spool/mqueue"
sandboxEmptyFiles="/var/run/utmp /var/run/utmpx /var/log/wtmp /var/log/wtmpx /var/log/lastlog /var/log/lastlogx"
+usage()
+{
+ echo "Usage: mksandbox [--pkgsrc=dir] [--src=srcdir] [--verbose] sandbox-dir"
+ exit 1
+}
+
opsys=`uname -s`
case "$opsys" in
Darwin)
@@ -124,14 +130,14 @@
--pkgsrc=*) pkgsrc=`echo $1 | $sedprog -e 's|^--pkgsrc=||'` ;;
--src=*) src=`echo $1 | $sedprog -e 's|^--src=||'` ;;
--verbose) set -x ;;
+ -*) usage ;;
*) break ;;
esac
shift
done
if [ $# -ne 1 ]; then
- echo "Usage: mksandbox [--pkgsrc=dir] [--src=srcdir] [--verbose] sandbox-dir"
- exit 1
+ usage
fi
if [ `$idprog -u` -ne 0 ]; then
Home |
Main Index |
Thread Index |
Old Index