package-del 255 B

123456789101112
  1. #!/bin/bash
  2. if [[ "$1" != "" ]];then
  3. dir="$(dirname $BASH_SOURCE)/..";
  4. if [[ -L "$dir/src/$1/src" ]];then
  5. rm -f $dir/src/$1/src;
  6. fi;
  7. rm -rf $dir/src/$1;
  8. rm -f $dir/etc/packages.d/$1;
  9. echo "Package $1 removed";
  10. else
  11. echo "Usage: $0 <package>";
  12. fi;