aboutsummaryrefslogtreecommitdiff
path: root/ports-mgmt
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@FreeBSD.org>2009-03-11 22:46:44 +0000
committerDmitry Marakasov <amdmi3@FreeBSD.org>2009-03-11 22:46:44 +0000
commitd484df5b9f56acdf91918aecc396b25adfbd99a2 (patch)
treefae6f0e84da037ff1b58093c5c62147bd49ec83d /ports-mgmt
parent28ffaaed4f91a24c0c0b4b74593e788d3ebe32f3 (diff)
downloadports-d484df5b9f56acdf91918aecc396b25adfbd99a2.tar.gz
ports-d484df5b9f56acdf91918aecc396b25adfbd99a2.zip
Notes
Diffstat (limited to 'ports-mgmt')
-rw-r--r--ports-mgmt/bpkg/Makefile2
-rw-r--r--ports-mgmt/bpkg/files/bpkg.810
-rw-r--r--ports-mgmt/bpkg/files/bpkg.sh.in27
-rw-r--r--ports-mgmt/bpkg/pkg-descr6
4 files changed, 31 insertions, 14 deletions
diff --git a/ports-mgmt/bpkg/Makefile b/ports-mgmt/bpkg/Makefile
index e809c33e89d8..5228f98f765d 100644
--- a/ports-mgmt/bpkg/Makefile
+++ b/ports-mgmt/bpkg/Makefile
@@ -8,7 +8,7 @@
#
PORTNAME= bpkg
-PORTVERSION= 2.0.5
+PORTVERSION= 2.0.7
CATEGORIES= ports-mgmt
MASTER_SITES= # none
DISTFILES= # none
diff --git a/ports-mgmt/bpkg/files/bpkg.8 b/ports-mgmt/bpkg/files/bpkg.8
index fe9c9714326a..b12881dfcbd0 100644
--- a/ports-mgmt/bpkg/files/bpkg.8
+++ b/ports-mgmt/bpkg/files/bpkg.8
@@ -1,4 +1,4 @@
-.\" Copyright (c) 2007-2008 Andy Kosela <akosela@andykosela.com>
+.\" Copyright (c) 2007-2009 Andy Kosela <akosela@andykosela.com>
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
@@ -23,7 +23,7 @@
.\" SUCH DAMAGE.
.\"
.\"
-.Dd August 5, 2008
+.Dd March 8, 2009
.Dt BPKG 8
.Os
.Sh NAME
@@ -34,16 +34,18 @@
.Op Fl bDdeFfgIijkLMmOopQqrSswz
.Ar pkg-name ...
.Nm
-.Op Fl CchltvZ
+.Op Fl BCchltvZ
.Pp
.Sh DESCRIPTION
.Nm
-is a simple tool written in sh(1) for displaying information about ports. Its
+is a simple tool written in sh(1) for displaying information about ports. Its
main goal is to provide a quick way to display all kinds of useful info about
installed ports and the whole ports tree.
.Sh OPTIONS
The following command line arguments are supported:
.Bl -tag -width F1
+.It Fl B
+create backup packages in /var/tmp/bpkg/ from all locally installed ports.
.It Fl b
create backup package in /var/tmp/bpkg/ from a locally installed port.
.It Fl C
diff --git a/ports-mgmt/bpkg/files/bpkg.sh.in b/ports-mgmt/bpkg/files/bpkg.sh.in
index d739ab5d3fef..b7da78911f8c 100644
--- a/ports-mgmt/bpkg/files/bpkg.sh.in
+++ b/ports-mgmt/bpkg/files/bpkg.sh.in
@@ -1,8 +1,7 @@
#!/bin/sh
-# @(#) bpkg.sh simple tool for displaying information about ports
# $FreeBSD$
-# Copyright (c) 2007-2008 Andy Kosela <akosela@andykosela.com>
+# Copyright (c) 2007-2009 Andy Kosela <akosela@andykosela.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -467,14 +466,30 @@ pkg_backup()
PKG_INSTALL=`pkg_info -xoQ ^$PKG | cut -d: -f1 | awk '{ORS=" " ;print}'`
echo "Creating backup package(s) "$PKG_INSTALL"in /var/tmp/bpkg/"
[ ! -d /var/tmp/bpkg/ ] && mkdir /var/tmp/bpkg/
+ cd /var/tmp/bpkg/
+
for e in $PKG; do
I=`pkg_info -xoQ ^$e | cut -d: -f1'`
- cd /var/tmp/bpkg/ && pkg_create -xb $I 1>/dev/null 2>&1
+ pkg_create -xb $I 1>/dev/null 2>&1
done
echo "Done."
exit 0
}
+pkg_backup_all()
+{
+ root
+ echo "Creating backup packages in /var/tmp/bpkg/"
+ [ ! -d /var/tmp/bpkg/ ] && mkdir /var/tmp/bpkg/
+ cd /var/tmp/bpkg/
+
+ for e in `pkg_info -Ea`; do
+ pkg_create -b "$e" 1>/dev/null 2>&1
+ done
+ echo "Done."
+ exit 0
+}
+
pkg_time()
{
/bin/ls -lUTt /var/db/pkg/ | awk -F' ' '{ print $6,$7,$8,$9,$10 }' | \
@@ -888,17 +903,16 @@ help()
echo "bpkg version `pkg_info -xI bpkg | cut -d- -f2 | cut -d' ' -f1`"
echo ""
echo "Usage: bpkg [-bDdeFfgIijkLMmOopQqrSswz] pkg-name ..."
- echo " bpkg [-CchltvZ]"
+ echo " bpkg [-BCchltvZ]"
echo ""
echo "Please see the bpkg(8) man page for more information"
- echo ""
exit 0
}
# End of functions
###############################################################################
-while getopts b:D:d:e:F:f:g:I:i:j:k:L:M:m:O:o:p:Q:q:r:S:s:w:z:CchltvZ opts; do
+while getopts b:D:d:e:F:f:g:I:i:j:k:L:M:m:O:o:p:Q:q:r:S:s:w:z:BCchltvZ opts; do
case $opts in
b) PKG=$OPTARG
pkg_backup;;
@@ -948,6 +962,7 @@ while getopts b:D:d:e:F:f:g:I:i:j:k:L:M:m:O:o:p:Q:q:r:S:s:w:z:CchltvZ opts; do
pkg_which-;;
z) PKG=$OPTARG
make_ldd;;
+ B) pkg_backup_all;;
C) pkg_clean2;;
c) pkg_clean;;
h) help;;
diff --git a/ports-mgmt/bpkg/pkg-descr b/ports-mgmt/bpkg/pkg-descr
index 993026d61ace..232327741a80 100644
--- a/ports-mgmt/bpkg/pkg-descr
+++ b/ports-mgmt/bpkg/pkg-descr
@@ -1,6 +1,6 @@
-bpkg is a simple tool written in sh(1) for displaying information about ports.
-Its main goal is to provide a quick way to display all kinds of useful info
-about installed ports and the whole ports tree.
+bpkg is a simple tool written in sh(1) for displaying information about
+ports. Its main goal is to provide a quick way to display all kinds of
+useful info about installed ports and the whole ports tree.
-- Andy Kosela
<akosela@andykosela.com>