Commit Graph

21 Commits

Author SHA1 Message Date
Gordian Edenhofer c7da5a6ef2 bacman: code structuring
Adding and clarifying comments.
Adding and removing some new lines.

Signed-off-by: Gordian Edenhofer <gordian.edenhofer@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2016-09-25 17:41:10 +10:00
Gordian Edenhofer 3a00bc31f2 bacman: rewrite usage function
Signed-off-by: Gordian Edenhofer <gordian.edenhofer@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2016-09-25 17:41:10 +10:00
Gordian Edenhofer 5c549b0e1d bacman: proper option handling
Switch to parseopts instead of merely checking the first argument.

Signed-off-by: Gordian Edenhofer <gordian.edenhofer@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2016-09-25 17:41:10 +10:00
Gordian Edenhofer 52ec8dfffe bacman: handle SIGHUP, SIGINT, SIGTERM signals
Trap SIGHUP, SIGINT, SIGTERM and remove working directories accordingly.

Signed-off-by: Gordian Edenhofer <gordian.edenhofer@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2016-09-25 17:41:10 +10:00
Gordian Edenhofer 7568928e71 bacman: allow for multiple packages as arguments
To enable the creation of multiple packages with one command move the
assembly process into its own function.

Signed-off-by: Gordian Edenhofer <gordian.edenhofer@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2016-09-25 17:41:10 +10:00
Allan McRae 4742f5929d Update copyright years for 2016
make update-copyright OLD=2015 NEW=2016

Signed-off-by: Allan McRae <allan@archlinux.org>
2016-01-04 13:27:08 +10:00
Alastair Hughes 6aee32102f Replace mktemp's --tmpdir option with shell code.
bacman and updpkgsums used GNU mktemp's --tmpdir option, which is not
supported by some other implementations (including busybox). Replace that with
shell code.

Signed-off-by: Alastair Hughes <hobbitalastair@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2016-01-04 13:27:08 +10:00
Allan McRae 2e48101999 Update copyright notices for 2015
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-02-01 21:19:04 +10:00
Florian Pritz cd2370754a Remove ts and sw from vim modeline when noet is set
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>
2014-01-28 20:19:25 +10:00
Allan McRae 3bb3b1555a Update copyright years for 2014
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-01-06 14:38:50 +10:00
Jason St. John 9749fb033c Fix misspellings and some grammar issues in output of some pacman contrib 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-15 20:09:37 +10:00
Jason St. John a15fd48016 Improve --help switch output for pacman contrib and pacman scripts
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-15 11:02:27 +10:00
Xyne 5ef0c3caa5 bacman: optionally include unmodified backup files when available
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-09-18 14:28:03 +10:00
Xyne 8561ad2256 bacman: update copyright information in version function
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-09-18 14:28:03 +10:00
Xyne ec15e859a4 bacman: pass unshifted arguments to fakeroot
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-09-18 14:28:03 +10:00
Aaron Lindsay 3f99cfba1b contrib: Unify quoting in error messages
This fixes error messages to display the contents of variables rather
than the variable name by replacing backticks with single quotes (m4
eats backticks). It also removes $"" localization from error messages to
eliminate security holes.

For instance, `rankmirrors nonexistent_file' will now display:
	'nonexistent_file' does not exist.
rather than:
	$1 does not exist.

Signed-off-by: Aaron Lindsay <aaron@aclindsay.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-09-18 14:28:03 +10:00
William Giokas 6e0c47d22f contrib: Add color to bacman
Signed-off-by: William Giokas <1007380@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-03-08 17:04:40 +10:00
Allan McRae 1dd3405813 Update copyright year for 2013
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-01-03 12:03:09 +10:00
Dan McGee 7193ce1ecd Merge branch 'maint' 2012-08-01 09:21:33 -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 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