Commit Graph

12 Commits

Author SHA1 Message Date
Allan McRae b7f8f5d26a paccache: make --help output look nice on 80 width terminal
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-06-06 13:47:32 +10:00
Dave Reisner 8be08f7cae Revert "paccache: avoid subshell in calling runcmd"
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 597286eb25.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-05-18 10:43:16 +10:00
Dave Reisner 597286eb25 paccache: avoid subshell in calling runcmd
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-04-12 09:42:43 +10:00
William Giokas d90641a894 contrib: Add color to paccache
Signed-off-by: William Giokas <1007380@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-08 17:04:40 +10:00
Dave Reisner 972528c021 paccache: use xargs to execute mv/rm commands
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-02-24 13:11:54 +10:00
William Giokas 457642231e Fix printing of paths
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-28 23:38:46 +10:00
Dave Reisner 250aaefb27 paccache: pass the --file option to pacsort
Resolves FS#33455.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-01-28 23:38:46 +10:00
Dave Reisner b1bb2eaa50 paccache: adopt size_to_human
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-06-25 23:39:46 -05:00
Dave Reisner a64a8d6cea paccache: allow running as root
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-20 19:32:58 -05:00
Dave Reisner 92e20b508d contrib: remove executable bit from input files
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-30 17:37:29 -05:00
Dave Reisner 6d10de881e paccache: adopt parseopts for options parsing
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-24 09:54:06 -04:00
Dave Reisner 1b494ab771 contrib: rename bash scripts: .in -> .sh.in
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>
2012-04-24 09:54:06 -04:00