#!/bin/ksh ################################################################################ # # cleansw # # This script removes all products from a depot. I run it before # re-creating the entire depot from scratch. # # # Author: David C. Snyder - 9/2/97 # # $Log: cleansw,v $ # Revision 1.1 1997/09/02 14:59:35 dsnyder # Initial revision # ################################################################################ DEPOT="/opt/gnu/sw" PRODUCTS=`swlist -d @ $DEPOT 2>/dev/null \ | awk '/^ [A-Z]/ {print $1",r="$2}'` if [ -n "$PRODUCTS" ] then swremove -d $PRODUCTS @ $DEPOT else echo "No products to remove from the $DEPOT depot." fi