Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Jun 2007 12:05:04 +0200 (CEST)
From:      Andy Kosela <spear@aegis.um.lublin.pl>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/114064: [NEW PORT] ports-mgmt/bpkg: Simple tool for managing FreeBSD packages/ports (supersedes ports/112572)
Message-ID:  <20070627100504.9B80067852@aegis.um.lublin.pl>
Resent-Message-ID: <200706271030.l5RAU2Zx040845@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         114064
>Category:       ports
>Synopsis:       [NEW PORT] ports-mgmt/bpkg: Simple tool for managing FreeBSD packages/ports (supersedes ports/112572)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jun 27 10:30:01 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Andy Kosela
>Release:        FreeBSD 6.2-RELEASE-p2 i386
>Organization:
>Environment:
System: FreeBSD aegis.um.lublin.pl 6.2-RELEASE-p2 FreeBSD 6.2-RELEASE-p2 #0: Tue Feb 27 22:56:09 UTC 2007
>Description:
bpkg is a simple tool for managing FreeBSD packages/ports. It is a wrapper 
around base system utilities manipulating the FreeBSD Ports Collection. The main
goal of this project is to provide one universal tool for packages/ports 
management.

-- Andy Kosela
<andy.kosela@gmail.com>

Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:
>Fix:

--- bpkg-1.0.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	bpkg-1.0
#	bpkg-1.0/files
#	bpkg-1.0/files/bpkg.8
#	bpkg-1.0/files/bpkg.sh.in
#	bpkg-1.0/Makefile
#	bpkg-1.0/pkg-descr
#
echo c - bpkg-1.0
mkdir -p bpkg-1.0 > /dev/null 2>&1
echo c - bpkg-1.0/files
mkdir -p bpkg-1.0/files > /dev/null 2>&1
echo x - bpkg-1.0/files/bpkg.8
sed 's/^X//' >bpkg-1.0/files/bpkg.8 << 'END-of-bpkg-1.0/files/bpkg.8'
X.\" Copyright (c) 2007 Andy Kosela <andy.kosela@gmail.com>
X.\" All rights reserved.
X.\"
X.\" Redistribution and use in source and binary forms, with or without
X.\" modification, are permitted provided that the following conditions
X.\" are met:
X.\" 1. Redistributions of source code must retain the above copyright
X.\"    notice, this list of conditions and the following disclaimer.
X.\" 2. Redistributions in binary form must reproduce the above copyright
X.\"    notice, this list of conditions and the following disclaimer in the
X.\"    documentation and/or other materials provided with the distribution.
X.\"
X.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
X.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
X.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
X.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
X.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
X.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
X.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
X.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
X.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
X.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
X.\" SUCH DAMAGE.
X.\"
X.\"
X.Dd June 24, 2007
X.Dt BPKG 8
X.Os
X.Sh NAME
X.Nm bpkg
X.Nd a simple tool for managing FreeBSD packages/ports.
X.Sh SYNOPSIS
X.Nm
X.Op Fl dDfgiIkLmnNprsSw 
X.Ar pkg-name ...
X.Nm
X.Op Fl aAcCFhlv
X.Pp
X.Sh DESCRIPTION
X.Nm
Xis a simple tool for managing FreeBSD packages/ports. It is a wrapper around 
Xbase system utilities manipulating the FreeBSD Ports Collection. The main goal 
Xof this project is to provide one universal tool for packages/ports management.
X.Sh OPTIONS
XThe following command line arguments are supported:
X.Bl -tag -width F1
X.It Ar pkg-name ...
Xwith no additional arguments, upgrade/install the specified packages.
X.It Fl a
Xupgrade all ports (interactive mode). [no arguments]
X.It Fl A
Xupgrade all ports (non-interactive mode). [no arguments]
X.It Fl c
Xclean all distfiles in /usr/ports/distfiles/* [no arguments]
X.It Fl C
Xclean all distfiles in /usr/ports/distfiles/* and also all working directories 
Xof the ports tree /usr/ports/*/*/work/ [no arguments]
X.It Fl d
Xdelete specified packages.
X.It Fl D
Xdisplay description of the package.
X.It Fl f
Xshow the packing list instructions for the package.
X.It Fl F
Xftp to FreeBSD packages repository and check the latest available package
Xversion. [no arguments]
X.It Fl g
Xshow files that do not match the recorded checksum.
X.It Fl h
Xdisplay help file. [no arguments]
X.It Fl i
Xdisplay info about the package.
X.It Fl I
Xdisplay short info about the package.
X.It Fl k
Xshow the deinstall script (if any) for the package.
X.It Fl l
Xdisplay short info about all installed packages. [no arguments]
X.It Fl L
Xshow the files within the package.
X.It Fl m
Xdisplay port's Makefile.
X.It Fl n
Xdo not actually install a package, just report the steps that would be taken if 
Xit was.
X.It Fl N
Xperform non-interactive installation of the package.
X.It Fl p
Xsearch the ports tree for the specified ports' name and display its path.
X.It Fl r
Xshow the list of dependencies and also the list of installed packages which 
Xrequire specified package.
X.It Fl s
Xshow the total size occupied by files installed within the package.
X.It Fl S
Xsearch the ports tree for the specified string.
X.It Fl w
Xwhich installed package owns the specified file.
X.It Fl v
Xlist all installed packages, and search for upgrades for them using ports. [no arguments]
X.El
X.Sh EXIT STATUS
X.Ex -std
X.Sh EXAMPLES
XThe following is an example of a typical usage
Xof the
X.Nm
Xcommand:
X.Pp
X.Dl Nm "bpkg foo"
X.Pp
XUpgrade or install a package named foo.
X.Pp
X.Dl Nm "bpkg -i 'foo1 foo2'" 
X.Pp
XDisplay info about packages foo1 and foo2.
X.Pp
X.Dl Nm "bpkg -S ^foo"
X.Pp
XDisplay ports that start with foo string.
X.Sh SEE ALSO
X.Xr pkg_add 1 ,
X.Xr pkg_delete 1 ,
X.Xr pkg_info 1 ,
X.Xr pkg_version 1 ,
X.Xr ports 7
X.Sh AUTHORS
X.An Andy Kosela <andy.kosela@gmail.com>
END-of-bpkg-1.0/files/bpkg.8
echo x - bpkg-1.0/files/bpkg.sh.in
sed 's/^X//' >bpkg-1.0/files/bpkg.sh.in << 'END-of-bpkg-1.0/files/bpkg.sh.in'
X#!/bin/sh
X
X#  Copyright (c) 2007 Andy Kosela <andy.kosela@gmail.com>
X#  All rights reserved.
X#
X#  Redistribution and use in source and binary forms, with or without
X#  modification, are permitted provided that the following conditions
X#  are met:
X#  1. Redistributions of source code must retain the above copyright
X#     notice, this list of conditions and the following disclaimer.
X#  2. Redistributions in binary form must reproduce the above copyright
X#     notice, this list of conditions and the following disclaimer in the
X#     documentation and/or other materials provided with the distribution.
X#
X#  THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
X#  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
X#  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
X#  ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
X#  FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
X#  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
X#  OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
X#  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
X#  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
X#  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
X#  SUCH DAMAGE.
X
Xtrap trap_exit 2
X
Xpkg=$@
X
Xroot() {
X	if [ `whoami` != root ]; then
X		echo "Access denied. Root privileges required."
X		exit 0
X	fi
X}
X
Xtrap_exit() {
X	echo -e "\n*** SIGINT detected ***"
X	exit 1
X}
X
Xinstalled() {
X	a=pkg_installed
X}
X
Xmissing() {
X	echo "It seems you typed the port which is not available in /usr/ports/"
X	echo "Check your port's name and try again."
X	exit 0
X}
X
Xinit_check() {
X	pkg_chk=`pkg_info -xoq $pkg 2>/dev/null`
X	[ ! -z "$pkg_chk" ] && installed
X
X	if [ -z "$a" ]; then
X		port_chk=`whereis -sq $pkg`
X		[ -z "$port_chk" ] && missing
X	fi
X} 
X
Xmain() {
X	root
X	if [ -z "$pkg" ]; then
X		echo "bpkg: you didn't specify any package to install/upgrade."
X		exit 0
X	fi
X
X	init_check
X
X	if [ -z "$a" ]; then
X		pkg_install=`whereis -sq $pkg | cut -d/ -f5 | awk '{ORS=" " ; print}'`
X		whereis -sq $pkg
X		echo ""
X		echo -e "\033[33m*** not installed ***\033[0m"
X		echo -n "Do you want to install "$pkg_install"using binary packages [y] "
X		read key
X		case $key in
X			n) echo "Installing new port(s):"
X		   	for e in `whereis -sq $pkg`; do
X		   		cd $e && make install clean
X		   	done
X		   	exit 0;;
X			*) echo "Installing new package(s):"
X		   	pkg_add -r $pkg_install
X		   	exit 0;;
X		esac
X	fi
X
X	pkg_install=`pkg_info -xoq $pkg | cut -d/ -f2 | awk '{ORS=" " ; print}'`
X	pkg_info -xoQ $pkg | awk -F: '{OFS=": " ; print $2, $1}'
X	echo ""
X	echo -e "\033[33m*** installed ***\033[0m"
X	echo -n "Do you want to upgrade "$pkg_install"using binary packages? [y] "
X	read key
X
X	case $key in
X		n) echo "Upgrading port(s):"
X	   	for e in `pkg_info -xoq $pkg`; do
X	   		c=`echo $e | cut -d/ -f2` 
X	   		pkg_delete -rix $c
X	   		cd /usr/ports/$e && make install clean
X	   	done
X	   	exit 0;;
X		*) echo "Upgrading package(s):"
X	   	pkg_delete -fix $pkg_install && pkg_add -r $pkg_install
X	   	exit 0;;
X	esac
X}
X
Xsimulation() {
X	root
X	init_check
X
X	if [ -z "$a" ]; then
X		pkg_install=`whereis -sq $pkg | cut -d/ -f5 | awk '{ORS=" " ; print}'`
X		whereis -sq $pkg
X		echo ""
X		echo -e "\033[33m*** not installed ***\033[0m"
X		echo -n "Do you want to install "$pkg_install"using binary packages (simulation mode) [y] "
X		read key
X		case $key in
X			n) echo "Installing new port(s): $pkg_install"
X		   	exit 0;;
X			*) echo "Installing new package(s):"
X		   	pkg_add -rn $pkg_install
X		   	exit 0;;
X		esac
X	fi
X
X	pkg_install=`pkg_info -xoq $pkg | cut -d/ -f2 | awk '{ORS=" " ; print}'`
X	pkg_info -xoQ $pkg | awk -F: '{OFS=": " ; print $2, $1}'
X	echo ""
X	echo -e "\033[33m*** installed ***\033[0m"
X	echo -n "Do you want to upgrade "$pkg_install"using binary packages? (simulation mode) [y] "
X	read key
X
X	case $key in
X		n) echo "Upgrading port(s): $pkg_install"
X	   	exit 0;;
X		*) echo "Upgrading package(s):"
X	   	pkg_delete -ixn $pkg_install && pkg_add -rn $pkg_install
X	   	exit 0;;
X	esac
X}
X
Xnon-interactive() {
X	root
X	init_check
X
X	if [ -z "$a" ]; then
X		pkg_install=`whereis -sq $pkg | cut -d/ -f5 | awk '{ORS=" " ; print}'`
X		whereis -sq $pkg
X		echo ""
X		echo -e "\033[33m*** not installed ***\033[0m"
X		echo "Installing new package(s):"
X	 	pkg_add -r $pkg_install
X	   	exit 0
X	fi
X
X	pkg_install=`pkg_info -xoq $pkg | cut -d/ -f2 | awk '{ORS=" " ; print}'`
X	pkg_info -xoQ $pkg | awk -F: '{OFS=": " ; print $2, $1}'
X	echo ""
X	echo -e "\033[33m*** installed ***\033[0m"
X	echo "Upgrading package(s):"
X	pkg_delete -fx $pkg_install && pkg_add -r $pkg_install
X	exit 0
X}
X
Xall() {
X	root
X	echo ""
X	echo -n "Do you want to upgrade all installed packages using binary packages? (interactive mode) [y] "
X	read key
X
X	case $key in
X		n) echo "Upgrading all ports:"
X	   	for e in `pkg_info -aoq`; do
X	   		c=`echo "$e" | cut -d/ -f2` 
X	   		pkg_delete -rix $c
X	   		cd /usr/ports/$e && make install clean
X	   	done
X	   	exit 0;;
X		*) echo "Upgrading all packages:"
X	   	all=`ls -l /var/db/pkg/ | awk '{print $9}' | sed 's/\(.*\)-.*/\1/g' | awk '{ORS=" " ;print}'`
X	   	pkg_delete -ifa && pkg_add -r $all
X	   	exit 0;;
X	esac
X}
X
Xall_non-interactive() {
X	root
X	echo ""
X	echo -n "Do you want to upgrade all installed packages using binary packages? (non-interactive mode) [y] "
X	read key
X
X	case $key in
X		n) echo "Upgrading all ports:"
X	   	for e in `pkg_info -aoq $pkg`; do
X	   		c=`echo $e | cut -d/ -f2` 
X	   		pkg_delete -rx $c
X	   		cd /usr/ports/$e && make install clean
X	   	done
X	   	exit 0;;
X		*) echo "Upgrading all packages:"
X	   	all=`ls -l /var/db/pkg/ | awk '{print $9}' | sed 's/\(.*\)-.*/\1/g' | awk '{ORS=" " ;print}'`
X	   	pkg_delete -fa && pkg_add -r $all
X	   	exit 0;;
X	esac
X}
X
Xpkg_info-xI() {
X	init_check
X	if [ -z "$a" ]; then
X		echo -e "\033[33m*** not installed ***\033[0m"
X		path=`whereis -sq $pkg`
X		echo "$path: `cat $path/Makefile | grep COMMENT | cut -d= -f2`"
X	else
X		echo -e "\033[33m*** installed ***\033[0m"
X		pkg_info -xI $pkg
X	fi
X
X	exit 0
X}
X
Xpkg_info-xL() {
X	z=`pkg_info -xL $pkg 2>/dev/null`
X
X	if [ -z "$z" ]; then
X        	echo "bpkg: no installed packages match pattern(s)" 
X	else
X		pkg_info -xoQ $pkg | awk -F: '{OFS=": " ; print $2, $1}'
X		echo ""
X		echo -e "\033[33m*** installed ***\033[0m"
X		echo "$z"
X	fi
X
X	exit 0
X}
X
Xpkg_inf() {
X	pkg_info 
X	exit 0
X}
X
Xpkg_info-xs() {
X	z=`pkg_info -xs $pkg 2>/dev/null`
X
X	if [ -z "$z" ]; then
X        	echo "bpkg: no installed packages match pattern(s)"
X	else
X		pkg_info -xoQ $pkg | awk -F: '{OFS=": " ; print $2, $1}'
X		echo ""
X		echo -e "\033[33m*** installed ***\033[0m"
X		echo "$z"
X	fi
X
X	exit 0
X}
X
Xpkg_info-xr() {
X	init_check
X	if [ -z "$a" ]; then
X		whereis -sq $pkg
X		echo ""
X        	echo -e "\033[33m*** not installed ***\033[0m"
X		for e in $pkg; do
X			path=`whereis -sq $e`
X			echo "$pkg: `cat $path/Makefile | grep COMMENT | cut -d= -f2`"
X			cd /usr/ports && make search name=^$e | grep R-deps
X			echo ""
X		done
X	else
X		pkg_info -xoQ $pkg | awk -F: '{OFS=": " ; print $2, $1}'
X		echo ""
X		echo -e "\033[33m*** installed ***\033[0m"
X		pkg_info -xrR $pkg
X	fi
X
X	exit 0
X}
X
Xpkg_info-xg() {
X	z=`pkg_info -xg $pkg 2>/dev/null`
X
X	if [ -z "$z" ]; then
X        	echo "bpkg: no installed packages match pattern(s)"
X	else
X		pkg_info -xoQ $pkg | awk -F: '{OFS=": " ; print $2, $1}'
X		echo ""
X		echo -e "\033[33m*** installed ***\033[0m"
X		echo "$z"
X	fi
X
X	exit 0
X}
X
Xpkg_info-xf() {
X	init_check
X	if [ -z "$a" ]; then
X		whereis -sq $pkg
X		echo ""
X        	echo -e "\033[33m*** not installed ***\033[0m"
X		for e in $pkg; do
X			path=`whereis -sq $e`
X			echo "$pkg: `cat $path/Makefile | grep COMMENT | cut -d= -f2`"
X			echo ""
X			cat $path/pkg-plist
X			echo ""
X		done
X	else
X		pkg_info -xoQ $pkg | awk -F: '{OFS=": " ; print $2, $1}'
X		echo ""
X		echo -e "\033[33m*** installed ***\033[0m"
X		pkg_info -xf $pkg
X	fi
X
X	exit 0
X}
X
Xpkg_info-xk() {
X	z=`pkg_info -xk $pkg 2>/dev/null`
X
X	if [ -z "$z" ]; then
X		echo "bpkg: no installed packages match pattern(s)"
X	else
X		pkg_info -xoQ $pkg | awk -F: '{OFS=": " ; print $2, $1}'
X		echo ""
X		echo -e "\033[33m*** installed ***\033[0m"
X		echo "$z"
X	fi
X
X	exit 0
X}
X
Xpkg_info-x() {
X	init_check
X
X	if [ -z "$a" ]; then
X		whereis -sq $pkg
X		echo ""
X		echo -e "\033[33m*** not installed ***\033[0m"
X		path=`whereis -sq $pkg`
X		echo "$pkg: `cat $path/Makefile | grep COMMENT | cut -d= -f2`"
X		echo ""
X		echo "Description:"
X		echo "`cat $path/pkg-descr`"
X	else
X		pkg_info -xoQ $pkg | awk -F: '{OFS=": " ; print $2, $1}'
X		echo ""
X		echo -e "\033[33m*** installed ***\033[0m"
X		pkg_info -x $pkg
X	fi
X
X	exit 0
X}
X
Xpkg_ver() {
X	pkg_version -Iv
X	exit 0
X}
X
Xpkg_path() {
X	for e in `ls -l /usr/ports/*/ | grep $pkg | awk '{print $9}'`; do
X		path=`whereis -sq $e`
X		echo "$path" ; cat $path/Makefile | grep COMMENT | cut -d= -f2
X	done
X
X	exit 0
X}
X
Xpkg_makefile() {
X	init_check
X	path=`whereis -sq $pkg`
X	less $path/Makefile 2>/dev/null
X	exit 0
X}
X
Xmake_search() {
X	init_check
X	if [ -z "$a" ]; then
X		whereis -sq $pkg
X		echo -e "\033[33m*** not installed ***\033[0m"
X		echo ""
X		for e in $pkg; do
X        		cd /usr/ports && make search name=^$e
X		done
X	else
X		pkg_info -xoQ $pkg | awk -F: '{OFS=": " ; print $2, $1}'
X		echo -e "\033[33m*** installed ***\033[0m"
X		echo ""
X		for e in $pkg; do
X	        	name=`pkg_info -xoq $e`
X			for i in $name; do
X				cd /usr/ports && make search path=$i$
X			done
X		done
X	fi
X
X	exit 0
X}
X
Xmake_search_w() {
X	cd /usr/ports && make search name=$pkg
X	exit 0
X}
X
Xpkg_find() {
X	arch=`uname -m`
X	sys=`uname -r | cut -d- -f1,2 | tr '[:upper:]' '[:lower:]'`
X	ftp -4Va ftp://ftp.freebsd.org/pub/FreeBSD/ports/$arch/packages-$sys/Latest/
X	exit 0
X}
X
Xpkg_delete-xr() {
X	root
X	z=`pkg_info -xoQ $pkg 2>/dev/null`
X
X	if [ -z "$z" ]; then
X        	echo "bpkg: no installed packages match pattern(s)"
X		exit 0
X	fi
X
X	pkg_info -xoQ $pkg | awk -F: '{OFS=": " ; print $2, $1}'
X	echo ""
X	echo -e "\033[33m*** installed ***\033[0m"
X	echo -n "Do you want to use recursive removal? [y] "
X	read key
X
X	case $key in
X		n) echo -n "Do you want to use force removal? [n] "
X		read key2
X		case $key2 in
X			y) pkg_delete -xf $pkg
X			exit 0;;
X			*) pkg_delete -x $pkg
X			exit 0;;
X		esac;;
X        	*) echo -n "Do you want to use force removal? [n] "
X		read key2
X		case $key2 in
X			y) pkg_delete -xrfi $pkg
X			exit 0;;
X			*) pkg_delete -xri $pkg
X			exit 0;;
X		esac;;
X	esac
X}
X
Xpkg_clean() {
X	root
X	echo "Cleaning /usr/ports/distfiles/*"
X	rm -rf /usr/ports/distfiles/* 1>/dev/null 2>&1
X	echo "Done."
X	exit 0
X}
X
Xpkg_clean2() {
X	root
X	echo "Cleaning /usr/ports/distfiles/* and /usr/ports/*/*/work/"
X	rm -rf /usr/ports/distfiles/* 1>/dev/null 2>&1 ; rm -rf /usr/ports/*/*/work/ 1>/dev/null 2>&1
X	echo "Done."
X	exit 0
X}
X
Xpkg_which-() {
X	grep "$pkg"$ /var/db/pkg/*/+CONTENTS | awk -F 'pkg/' '{ print $2 }' | \
X	sed '/@dirrm/ d ; /@unexec/ d ; /@comment/ d ; s/\/+CONTENTS//g ; s/:@comment .*ORIGIN//g' | \
X	awk -F: '{ print $1 ":\t/usr/local/" $2 }'
X	exit 0
X}
X
Xhelp() {
X	echo "bpkg version `pkg_info -xI bpkg | cut -d- -f2 | cut -d' ' -f1`" 
X	echo ""
X	echo "Help:"
X	echo "bpkg [-dDfgiIkLmnNprsSw] pkg-name ..."
X	echo "bpkg [-aAcCFhlv]"
X	echo ""
X	echo "Read also man page: man bpkg"
X	exit 0
X}
X
X# End of functions
X################################################################################
X
Xwhile getopts d:D:f:g:i:I:k:L:m:n:N:p:r:s:S:w:aAcCFhlv opts; do
X	case $opts in
X		d) pkg=$OPTARG
X		   pkg_delete-xr;;
X		D) pkg=$OPTARG
X		   pkg_info-x;;
X		f) pkg=$OPTARG
X		   pkg_info-xf;;
X		g) pkg=$OPTARG
X		   pkg_info-xg;;
X		i) pkg=$OPTARG
X		   make_search;;
X		I) pkg=$OPTARG
X		   pkg_info-xI;;
X		k) pkg=$OPTARG
X		   pkg_info-xk;;
X		L) pkg=$OPTARG
X		   pkg_info-xL;;
X		m) pkg=$OPTARG
X		   pkg_makefile;;
X		n) pkg=$OPTARG
X		   simulation;;
X		N) pkg=$OPTARG
X		   non-interactive;;
X		p) pkg=$OPTARG
X		   pkg_path;;
X		r) pkg=$OPTARG
X		   pkg_info-xr;;
X		s) pkg=$OPTARG
X		   pkg_info-xs;;
X		S) pkg=$OPTARG
X		   make_search_w;;
X		w) pkg=$OPTARG
X		   pkg_which-;;
X		a) all;;
X		A) all_non-interactive;;
X		c) pkg_clean;;
X		C) pkg_clean2;;
X		F) pkg_find;;
X		h) help;;
X		l) pkg_inf;;
X		v) pkg_ver;;
X		*) help;;
X	esac
Xdone
X
Xmain
END-of-bpkg-1.0/files/bpkg.sh.in
echo x - bpkg-1.0/Makefile
sed 's/^X//' >bpkg-1.0/Makefile << 'END-of-bpkg-1.0/Makefile'
X# New ports collection makefile for:	bpkg
X# Date created:				24 June 2007
X# Whom:					Andy Kosela <andy.kosela@gmail.com>
X#
X# $FreeBSD$
X#
X# This port is self contained in the files directory.
X#
X
XPORTNAME=	bpkg
XPORTVERSION=	1.0
XCATEGORIES=	ports-mgmt
XMASTER_SITES=	# none
XDISTFILES=	# none
X
XMAINTAINER=	andy.kosela@gmail.com
XCOMMENT=	Simple tool for managing FreeBSD packages/ports
X
XNO_BUILD=	yes
XSUB_FILES=	bpkg.sh
X
XPLIST_FILES=	sbin/bpkg
X
XMAN8=		bpkg.8
X
Xdo-fetch:
X	@${DO_NADA}
X
Xdo-install:
X	${INSTALL_SCRIPT} ${WRKDIR}/bpkg.sh ${PREFIX}/sbin/bpkg
X	${INSTALL_MAN} ${FILESDIR}/bpkg.8 ${MAN8PREFIX}/man/man8
X
X.include <bsd.port.mk>
END-of-bpkg-1.0/Makefile
echo x - bpkg-1.0/pkg-descr
sed 's/^X//' >bpkg-1.0/pkg-descr << 'END-of-bpkg-1.0/pkg-descr'
Xbpkg is a simple tool for managing FreeBSD packages/ports. It is a wrapper 
Xaround base system utilities manipulating the FreeBSD Ports Collection. The main
Xgoal of this project is to provide one universal tool for packages/ports 
Xmanagement.
X
X-- Andy Kosela
X<andy.kosela@gmail.com>
END-of-bpkg-1.0/pkg-descr
exit
--- bpkg-1.0.shar ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070627100504.9B80067852>