Blame | Last modification | View Log | RSS feed
#! /bin/bash# This shell script is used by blatQuarantine to delete one version of a package# The script is run as root# The path to the script must be configured in the sudoers file#dpkg_archive=${1:?Package archive not specified}pkgName=${2:?Package Name not specified}pkgVersion=${3:?Package Version not specified}if [ ! -d $dpkg_archive ] ; thenecho "Not a directory: $dpkg_archive"exit 1fipkg="$dpkg_archive/$pkgName"if [ ! -d $pkg ] ; thenecho "Not a package: $pkg"exit 1fipver="$pkg/$pkgVersion"if [ ! -d $pver ] ; thenecho "Package Version not present: $pver"exit 0fiecho "Remove: $pver"#echo "------ THE RM COMMAND IS CURRENLY DISABLED"rm -rf $pverrmdir --ignore-fail-on-non-empty $pkgif [ -d $pver ] ; thenecho Package Version not deleted: $pverexit 1fiexit 0