1234567891011121314151617181920 |
- #!/bin/bash
- root="$(readlink -f $(dirname $BASH_SOURCE)/..)";
- . $root/etc/packages.conf
- _clean(){
- echo -e "\t$1";
- cd $root/src/$1;
- rm -f *.pkg.tar.xz;
- }
- echo "Cleaning...";
- if [[ "$1" == "" ]];then
- for val in "${packages[@]}"; do
- unset package;
- declare -A package;
- eval "package=($val)";
- _clean "${package[name]}";
- done;
- else
- _clean $1;
- fi;
- echo "Done";
|