summaryrefslogtreecommitdiffstats
path: root/contrib/paccache.sh.in
AgeCommit message (Collapse)AuthorFilesLines
2014-11-04Exit with 0/SUCCESS if there are no packages to removeEric Schultz1-1/+1
Previously the lack of candidate packages was considered an error and return 1/FAILURE but really this isn't an issue. Also, for systemd (and others) this flagged the instance as having failed for no good reason. Signed-off-by: Eric Schultz <eric@schultzter.ca> Signed-off-by: Allan McRae <allan@archlinux.org>
2014-10-19paccache: avoid spurious blank line written to stderrDave Reisner1-1/+1
this is just stylistic formatting, so write it to stdout. ref: https://bugs.archlinux.org/task/42389 Signed-off-by: Allan McRae <allan@archlinux.org>
2014-09-30paccache: parse_filename bug fixMaxim Andersson1-1/+6
Filenames got parsed wrongly, causing whitelist- and blacklist-checks to always return false. Caused by 8122fae51a when full path names to pkgs were introduced. Signed-off-by: Maxim Andersson <thesilentboatman@gmail.com>
2014-09-15paccache: read default cachedir from pacman.confDave Reisner1-2/+21
Implements FS#40738.
2014-09-15paccache: add support for multiple cachedirsMaxim Andersson1-23/+37
Signed-off-by: Maxim Andersson <thesilentboatman@gmail.com>
2014-01-28Remove ts and sw from vim modeline when noet is setFlorian Pritz1-1/+1
Forcing vim users to view files with a tabstop of 2 seems really unnecessary when noet is set. I find it much easier to read code with ts=4 and I dislike having to override the modeline by hand. Command run: find . -type f -exec sed -i '/vim.* noet/s# ts=2 sw=2##' {} + Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-12-15Fix misspellings and some grammar issues in output of some pacman contrib ↵Jason St. John1-2/+2
scripts Affected files: -- contrib/bacman.sh.in -- contrib/paccache.sh.in -- contrib/pacdiff.sh.in -- contrib/rankmirrors.sh.in Signed-off-by: Jason St. John <jstjohn@purdue.edu> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-12-15paccache: clarify help outputAllan McRae1-3/+3
The help output referred to variables in the script rather than what they were labelled in the parameter argument. Signed-off-by: Allan McRae <allan@archlinux.org>
2013-11-15Improve --help switch output for pacman contrib and pacman scriptsJason St. John1-10/+10
Unify the formatting of the --help switch for pacman utils, if it exists. All of the pacman utils will now output help text using the following format: util-name (pacman) v<pacman version> one line description of util's purpose Usage: util-name [options] -b, --bar whatever --bar does -f, --foo whatever --foo does -h, --help display this help message Reported-by: Karol Błażewicz <karol.blazewicz at gmail.com> Signed-off-by: Jason St. John <jstjohn@purdue.edu>
2013-11-15Fix whitespace and other formatting issuesJason St. John1-2/+2
This commit: -- replaces space-based indents with tabs per the coding standards -- removes extraneous whitespace (e.g. extra spaces between function args) -- adds missing braces for a one-line if statement Signed-off-by: Jason St. John <jstjohn@purdue.edu>
2013-06-06paccache: make --help output look nice on 80 width terminalAllan McRae1-14/+17
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-05-18Revert "paccache: avoid subshell in calling runcmd"Dave Reisner1-4/+3
su is terribad. In addition to reverting, this also removes support for privilege escalation via su. If you want to use paccache as root and fail to comprehend how much better sudo is than su, then run paccache directly via su. Fixes FS#35173. This reverts commit 597286eb258f841dfc00f65474138fc6192f0092. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-04-12paccache: avoid subshell in calling runcmdDave Reisner1-2/+2
Avoids problems with one of the worst CLI tools ever created, su. Fixes FS#34656. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-08contrib: Add color to paccacheWilliam Giokas1-11/+9
Signed-off-by: William Giokas <1007380@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-02-24paccache: use xargs to execute mv/rm commandsDave Reisner1-2/+2
This removes the restriction on the length of the command line, as xargs will work around by running multiple instances of the command for us. As seen: https://bbs.archlinux.org/viewtopic.php?pid=1232959 Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-01-28Fix printing of pathsWilliam Giokas1-4/+4
Originally printed a leading \ before all path names as the `' would be removed during the make. Using '' should be just as good as using `'. paccache.sh.in: die "cachedir \`%s' does not exist or is not a directory" "$cachedir" paccache die "cachedir \%s does not exist or is not a directory" "$cachedir" Signed-off-by: William Giokas <1007380@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-01-28paccache: pass the --file option to pacsortDave Reisner1-2/+2
Resolves FS#33455. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2012-06-26paccache: adopt size_to_humanDave Reisner1-20/+1
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-05-21paccache: allow running as rootDave Reisner1-6/+1
The main motivation for this change is to allow this to be run as a cron job. Satisfies FS#29897 and some other undocumented requests for this. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-05-01contrib: remove executable bit from input filesDave Reisner1-0/+0
There's no reason to make these executable, and this also mimics what we do in the scripts/ subdir. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-24paccache: adopt parseopts for options parsingDave Reisner1-47/+72
Add longopts and update usage. This removes the TODO item and incorporates --help/--version into the standard option set. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-24contrib: rename bash scripts: .in -> .sh.inDave Reisner1-0/+319
For consistency with the scripts/ directory, ensure that all bash scripts use the same pre-build suffix. Signed-off-by: Dave Reisner <dreisner@archlinux.org>