#! /bin/sh # Steven Shiau APTDIR=$1 MOD=$2 USAGE="Usage: $0 APTDIR PACKAGE_DIR" if [ $# -ne 2 ]; then echo "$USAGE" echo "Example: " echo "$0 /opt/apt OOo" echo "where RPMS.OOo exists in /opt/apt" exit 1 fi ########################################################################### #### $MOD packages for REDHAT ########################################################################### # Regenerate the apt indexes genbasedir --flat --bloat $APTDIR/ $MOD #################################### ########### Remake hash ############ #################################### genbasedir --hashonly $APTDIR $MOD echo echo "----------------------------------------------" echo "Add the following line to /etc/apt/sources.list" echo "rpm copy:$APTDIR . $MOD"