summaryrefslogtreecommitdiff
path: root/contrib/updpkgsums.sh.in
AgeCommit message (Collapse)Author
2016-05-05Add -m/--nocolor options to updpkgsumsAshley Whetter
Fixes FS#43346 Signed-off-by: Ashley Whetter <ashley@awhetter.co.uk> Signed-off-by: Allan McRae <allan@archlinux.org>
2016-01-04Replace mktemp's --tmpdir option with shell code.Alastair Hughes
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>
2015-01-02updpkgsums: retain permissions on rewritten PKGBUILDDave Reisner
This could have been easy with something like chown's --reference flag, but this is GNU specific. Instead, just truncate and rewrite the file. Our exit trap cleans up after us. Fixes: https://bugs.archlinux.org/task/43272 Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-19updpkgsums: add more error checking before replacementv4.2.0Dave Reisner
Re-add some paranoia which was inadvertently lost with 768b65e934. In case 'makepkg -g' fails to generate new sums (e.g. when a remote resource cannot be fetched), or awk fails to write the new file (i have no idea when this would happen), bail out with an error. Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-18updpkgsums: drop in-place rewrite hack, use a tempfileDave Reisner
This apparently exposes (what I think is) a subtle bug in cygwin's handling of subst'd drives. Let's just drop the hackery and use a tempfile, which should always work. Also, introduce a proper die() function which replaces previous hand-rolled error+exit pattern, but which wrote to stdout. Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-05updpkgsums: avoid exec'ing awk, so the trap actually worksDave Reisner
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-09-30updpkgsums: update to recognize arch-specific sourcesDave Reisner
This change reveals a bootstrapping bug -- since we call the bare "makepkg" and rely on PATH lookup, we might not have a makepkg which can generate architecture-specific checksums.
2014-09-15updpkgsums: use a throwaway build dirDave Reisner
This prevents updpkgsums from potentially dirtying an otherwise pristine directory (likely $PWD) when makepkg creates the srclinks. Signed-off-by: Allan McRae <allan@archlinux.org>
2014-01-28Remove ts and sw from vim modeline when noet is setFlorian Pritz
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-11-15Improve --help switch output for pacman contrib and pacman scriptsJason St. John
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-09-18contrib: Unify quoting in error messagesAaron Lindsay
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-02-07unset executable bit on updpkgsums.sh.inAndrew Gregory
No other contrib script is executable. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2013-01-03Update copyright year for 2013Allan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2012-08-01contrib/updpkgsums: Fix error messageAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-06-25updpkgsums: avoid fancy quoting in error messageDave Reisner
m4 has a field day parsing escapes and actually vandalizes this string, causing the error to look like: ==> ERROR: \PKGBUILD\ not found or is not a file Avoid all quoting and just match up with how makepkg reports errors (no quoting at all). Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-20updpkgsums: add new contrib scriptDave Reisner
This updates checksums in a PKGBUILD in-place. If no sums are found, they are appended to the end.