How to package up (all) installed ports
Danny Pansters
danny at ricin.com
Fri Feb 18 01:30:54 GMT 2005
On Friday 18 February 2005 02:17, you wrote:
> #!/bin/sh
>
> # Shell script to create packages of all the ports installed in the system.
> # Usage: 'sh package-ports.sh'
> # Will create the packages in the current directory.
>
> PORTS=`pkg_info | awk '{print $1}'` # Filter the description.
> NUM_PORTS=`echo "$PORTS" | awk 'END {print NR}'`
> BZIP="-j" # Use bzip2 instead of gzip.
> PKGCMD="pkg_create $BZIP -b" # Command to create package.
>
> echo "Packaging $NUM_PORTS ports"
>
> # Process one port at time.
>
> for PORT in $PORTS
> do
> echo "Packaging port \"$PORT\""
> $PKGCMD $PORT
> done
>
> echo "Done"
>
> exit 0
I like it. Thank you!
Dan
More information about the freebsd-questions
mailing list