summaryrefslogtreecommitdiff
path: root/contrib/paccache.in
Commit message (Collapse)AuthorAge
* paccache: add vim modelineDave Reisner2011-10-26
| | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* paccache: ensure seen/seenarch vars are setDave Reisner2011-10-26
| | | | | | | | Doesn't do a whole lot of good to compare against values that are never set. Fixes bug where -vvv output wasn't grouping packages together properly. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* paccache: proper quoting in [[ expression ]]lolilolicon2011-09-30
| | | | | | | | Always quote the right-hand side of expression when the == or != operator is used, unless intended as a pattern. Signed-off-by: lolilolicon <lolilolicon@gmail.com> Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* paccache: declare variables explicitlylolilolicon2011-09-30
| | | | | | | | Declare and initialize integer variables 'needsroot' and 'verbose'. Don't use the fact that (( undefined_variable )) evaluates to 0. Signed-off-by: lolilolicon <lolilolicon@gmail.com> Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* paccache: allow strictly integer for -k optionlolilolicon2011-09-29
| | | | | | | | | | | | | | Verify the argument to -k is a non-negative integer. Leading zeros are simply stripped. 'declare -i keep' allowed the argument to -k to be any arithmetic evaluation expression. The simple assignment 'keep=$OPTARG' triggers arithmetic evaluation implicitly, which can either consume a huge amount of resources with input such as '2**2**32' or immediately produce an error on invalid input. Instead, we simply 'declare -- keep' and avoid all that. Signed-off-by: lolilolicon <lolilolicon@gmail.com> Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* paccache: remove unnecessary if checkDave Reisner2011-09-18
| | | | | | | This is superfluous as the ensuing for loop will exit immediately on the same condition avoided by the if. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* paccache: escape . in trimming of diskspace stringDave Reisner2011-09-11
| | | | | | | | | | Before: ==> finished dry run: 2 candidates (diskspace saved: 7. MiB) After: ==> finished dry run: 2 candidates (diskspace saved: 7.8 MiB) Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* paccache: use pacsort instead of sort -VDave Reisner2011-08-08
| | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* contrib/paccache: misc cleanup and bugfixDave Reisner2011-08-08
| | | | | | | | | | * change error verbiage when run as root * delete sigs along with packages * fix bug in diskspace calculations * merge END block in pkgfilter Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* paccache: add new contrib scriptDave Reisner2011-08-02
paccache is a robust and flexible package cache cleaner with a variety of options. Much credit goes to DJ Mills and Pat Brisbin for ideas behind this script. Signed-off-by: Dave Reisner <dreisner@archlinux.org> [Dan: add .gitignore entry] Signed-off-by: Dan McGee <dan@archlinux.org>