Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/pkgviews]: src/usr.sbin/pkg_install/view Allow specifying a stowdir that...
details: https://anonhg.NetBSD.org/src/rev/beadbcfe8829
branches: pkgviews
changeset: 534221:beadbcfe8829
user: jlam <jlam%NetBSD.org@localhost>
date: Mon Jul 14 13:30:57 2003 +0000
description:
Allow specifying a stowdir that is not under the prefix directory. This
allows adding depoted packages outside of ${LOCALBASE} into the default
view in ${LOCALBASE}.
diffstat:
usr.sbin/pkg_install/view/pkg_view.sh | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diffs (45 lines):
diff -r 2ee6464640b3 -r beadbcfe8829 usr.sbin/pkg_install/view/pkg_view.sh
--- a/usr.sbin/pkg_install/view/pkg_view.sh Mon Jul 14 12:28:36 2003 +0000
+++ b/usr.sbin/pkg_install/view/pkg_view.sh Mon Jul 14 13:30:57 2003 +0000
@@ -1,6 +1,6 @@
#! /bin/sh
-# $NetBSD: pkg_view.sh,v 1.1.2.7 2003/07/14 12:28:36 jlam Exp $
+# $NetBSD: pkg_view.sh,v 1.1.2.8 2003/07/14 13:30:57 jlam Exp $
#
# Copyright (c) 2001 Alistair G. Crooks. All rights reserved.
@@ -48,10 +48,11 @@
touchprog=/usr/bin/touch
usage() {
- echo 'Usage: pkg_view [-i ignore] [-v viewname] [-p prefix] add|check|delete pkgname...'
+ echo 'Usage: pkg_view [-i ignore] [-v viewname] [-d stowdir] [-p prefix] add|check|delete pkgname...'
exit 1
}
+stowdir=""
prefix=${PREFIX:-/usr/pkg}
view=${PKG_VIEW:-""}
ignorefiles=${PLIST_IGNORE_FILES:-info/dir}
@@ -59,6 +60,8 @@
while [ $# -gt 1 ]; do
case "$1" in
+ -d) stowdir=$2; shift ;;
+ -d*) stowdir=`echo $1 | $sedprog -e 's|^-d||'` ;;
-i) ignorefiles="$ignorefiles $2"; shift ;;
-i*) ignorefiles="$ignorefiles `echo $1 | $sedprog -e 's|^-i||'`" ;;
-p) prefix=$2; shift ;;
@@ -84,7 +87,10 @@
esac
shift
-depot_pkg_dbdir=${prefix}/packages
+case "${stowdir}" in
+"") depot_pkg_dbdir=${prefix}/packages ;;
+*) depot_pkg_dbdir=${stowdir} ;;
+esac
# XXX Only support the standard view.
view=""
Home |
Main Index |
Thread Index |
Old Index