Skip to content

Commit

Permalink
Attempt at making a --clean function
Browse files Browse the repository at this point in the history
Need to test it, more work on pbrisbin#41
  • Loading branch information
LilyCathelineau committed Nov 15, 2018
1 parent edf5ec2 commit b02a397
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion aurget
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ Usage: aurget [ -h | -S* [ --options ] [ -- ] <arguments> ]
build in <directory>
--devel only affects -Su, add all development packages
--clean Removes pkgbuild files
--deps resolve dependencies
--nodeps don't resolve dependencies
Expand Down Expand Up @@ -166,6 +168,8 @@ searching() { [[ "$opmode" == 'search' ]]; }

upgrading() { [[ "$opmode" == 'upgrade' ]]; }

clean() { [[ "$opmode" == 'clean' ]]; }

resolving() { $resolve_dependencies; }

eager_sudo() { $eager_sudo; }
Expand Down Expand Up @@ -294,6 +298,7 @@ initialize() {
--ignore) shift; ignore_packages+=" $1" ;;
--noconfirm) noconfirm=true; makepkg_options+=' --noconfirm' ;;
--devel) devels=true ;;
--clean) opmode='clean' ;;
--deps) resolve_dependencies=true ;;
--nodeps) resolve_dependencies=false ;;
--edit) edit_pkgbuilds='always' ;;
Expand Down Expand Up @@ -723,7 +728,9 @@ declare -A target_versions # name->version
declare -A target_deps # pkgbase->is-dep?

initialize "$@"

if clean; then
clean_package_directory
fi
if searching; then
perform_search
else
Expand Down

0 comments on commit b02a397

Please sign in to comment.