summaryrefslogtreecommitdiff
path: root/scripts/pkgdelta.sh.in
Commit message (Collapse)AuthorAge
* makepkg: Move parseopts from library to libmakepkgAlad Wenter2016-10-22
| | | | | | | | | | | | | | | parseopts is used in makepkg and other scripts such as pacman-key as a getopt replacement. Instead of including it in those scripts via a macro, move it to libmakepkg/util/parseopts.sh and have scripts source this file where appropriate. To keep the parseopts test, a new variable was introduced: PM_LIBMAKEPKG_DIR Signed-off-by: Alad Wenter <alad@archlinux.info> Signed-off-by: Allan McRae <allan@archlinux.org>
* pkgdelta: Use high compression options offered by xdelta3Mohammad Alsaleh2015-01-02
| | | | | | | | | | | | | | | | | | | | | | | | | * Add -9 which is the highest compression level. * Use lzma for secondary compression. Decompression speed is largely unaffected as most cycles are consumed by xz for re-compression. Some numbers: clang x86_64 [3.5.0-2.1 to 3.5.0-3] 17.21MiB default (0.73) 15.67MiB -9 (0.67) 13.59MiB -9 -S djw (0.58) 12.01MiB -9 -S lzma (0.51) inkscape x86_64 [0.48.5-3 to 0.48.5-4] 02.69MiB default (0.21) 01.64MiB -9 (0.13) 01.30MiB -9 -S djw (0.10) 01.01MiB -9 -S lzma (0.08) Signed-off-by: Mohammad Alsaleh <CE.Mohammad.AlSaleh@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* Remove ts and sw from vim modeline when noet is setFlorian Pritz2014-01-28
| | | | | | | | | | | | 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>
* Improve --help switch output for pacman contrib and pacman scriptsJason St. John2013-11-15
| | | | | | | | | | | | | | | | | | | 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>
* pkgdelta: fix improper passing of file argumentDave Reisner2013-03-14
| | | | | | | Looks like I hosed this pretty hard in 5a5e712c749edb8. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
* scripts: Add color to pkgdeltaWilliam Giokas2013-03-08
| | | | | Signed-off-by: William Giokas <1007380@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* pkgdelta: avoid use of eval and IFS manipulationDave Reisner2012-12-14
| | | | | | | | | | | Instead of blindly consuming data from the .PKGINFO file, parse it more closely and only declare variables as needed. Should help to avoid nonsensical errors and possibly dangerous command execution as seen in FS#32852. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
* pkgdelta: pass correct args to create_deltaDave Reisner2012-09-18
| | | | | | | | Somewhere in the arg parse refactoring, the args array went away and we simply stashed our remaining parameters as positionals. Fix this up so that pkgdelta doesn't mysteriously hang in read_pkginfo(). Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* pkgdelta: use human_to_size to parse --min-pkg-sizeDave Reisner2012-06-25
| | | | | | | Update the documentation accordingly to mention that users can expect huamn readable sizes to be acceptable. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* pkgdelta: add missing --version longoptDave Reisner2012-06-25
| | | | | | | This was missed in the switch to parseopts, and was caught by distcheck. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Merge branch 'maint'Dan McGee2012-05-20
|\ | | | | | | | | Conflicts: scripts/pacman-key.sh.in
| * Fix gettext usage in pkgdelta help instructionsDan McGee2012-05-20
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* | pkgdelta: adopt parseopts for option parsingDave Reisner2012-05-20
| | | | | | | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2012-04-24
|\| | | | | | | | | Conflicts: scripts/repo-add.sh.in
| * pkgdelta/repo-add: quoting fixesFlorian Pritz2012-04-20
| | | | | | | | | | | | | | | | This removes some unnecessary quotes and adds quotes in a few places to hopefully work correctly if the tempdir has spaces. Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Dan McGee <dan@archlinux.org>
| * pkgdelta: implement requirments for delta generationFlorian Pritz2012-04-20
| | | | | | | | | | | | | | | | Big deltas or deltas for very small packages are not needed so we should check that and not generate any. Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Dan McGee <dan@archlinux.org>
| * pkgdelta: rework option/argument parserFlorian Pritz2012-04-20
| | | | | | | | | | Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2012-04-07
|\| | | | | | | | | | | Conflicts: lib/libalpm/signing.c lib/libalpm/sync.c
| * pkgdelta: exit 1 upon errorFlorian Pritz2012-04-07
| | | | | | | | | | | | | | | | This has been 0 since 9fa18d9a4b4ce5217842c71d8a45676e3fb9d3f4, but it doesn't makes sense because we are raising an error. Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Dan McGee <dan@archlinux.org>
| * pkgdelta: use bsdtar -q optionDan McGee2012-04-07
| | | | | | | | | | | | | | | | | | This matches the optimization made to repo-add in commit 8bbaf045b9ce way back in 2009. We don't need to read the whole package file to ensure multiple .PKGINFO entries don't exist, as well-formed packages should have this file first in the archive. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2012-01-30
|\| | | | | | | | | Conflicts: scripts/makepkg.sh.in
| * scripts: always use printf with embedded gettextDave Reisner2012-01-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This addresses two problems: 1) echo's behavior is inconsistent when dealing with flags, and can potentially be problematic. $ echo -n $ echo -- -n -- -n 2) Always using the end of options markers prevents translated strings from throwing errors, as shown in FS#28069. The remaining "inconsistencies" are because printf is being used in a guaranteed safe manner, e.g. printf '%s\n' "$(gettext "--this can never break")" Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | scripts/*: Declare several constant variables read-onlyLukas Fleischer2011-12-07
|/ | | | | | | | Be more semantically accurate and avoid accidental overwriting of some configuration variables that are considered to be constant. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de> Signed-off-by: Dan McGee <dan@archlinux.org>
* pkgdelta: proper quoting in [[ expression ]]lolilolicon2011-09-28
| | | | | | | 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>
* scripts/pkgdelta: fix `make distcheck`Dan McGee2011-08-11
| | | | | | | --help and --version are required by the sanity checks performed by `make distcheck`. Signed-off-by: Dan McGee <dan@archlinux.org>
* scripts/pkgdelta: exit properly on missing argsDave Reisner2011-07-28
| | | | | | | Removes usage of 'nounset' which, when combined with 'errexit' can cause undesirable early exits. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* fix vim syntax highlighting of .sh filesFlorian Pritz2011-06-30
| | | | | | | | | | vim recognises what type of shell script it's dealing with by looking at the shebang. If detection fails it falls back to sh which doesn't support some bash features. Adding a normal, possibly broken, shebang which gets fixed by the Makefile allows vim to detect bash syntax. Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Dan McGee <dan@archlinux.org>
* po/: split into scripts/po/ and src/pacman/po/Dan McGee2011-06-23
| | | | | | | | | | | | | This is the first step at separating the pacman message catalog and the scripts message catalog. Makefiles, configure.ac, and other such files are adjusted accordingly, as well as renaming files. The TEXTDOMAIN of scripts is also adjusted. Note that no actual pot or po files get changed here; these will get pruned in a future commit so each catalog contains only the necessary messages. Signed-off-by: Dan McGee <dan@archlinux.org>
* scripts: refactor output formatting functionsAllan McRae2011-06-15
| | | | | | | | | Move the common output formatting functions into a separate library file and import that into each script. makepkg is excluded due to its additional color formatting. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* pkgdelta: add vim modelineAllan McRae2011-06-08
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Fix some easy to find double translationsDan McGee2011-02-28
| | | | | | | | A lot of these were places that should have used the same message but didn't, or were very easy to convert to using the same message and letting some of the burden off of the translators. Signed-off-by: Dan McGee <dan@archlinux.org>
* Fix bash shell location checkDan McGee2010-10-13
| | | | | | | | | | BASH is defined when you are actually using bash during configure, which sucks because it ends up being '/bin/sh', messing up all of our scripts. Change the name of the variable we use in configure, and also ensure we get a full path to the executable by using AC_PATH_PROGS rather than AC_CHECK_PROGS. Finally, change the variable name everywhere we use it. Signed-off-by: Dan McGee <dan@archlinux.org>
* Use sysconfdir, localstatedir, BASH instead of hardcoded valuesNezmer2010-10-11
| | | | | | | | | This applies to contrib/ files, our scripts, and the documentation. Dan: fix 'make clean' in contrib/ directory. Signed-off-by: Nezmer <git@nezmer.info> Signed-off-by: Dan McGee <dan@archlinux.org>
* scripts: replace test builtin [ with shell keywords [[ and ((Cedric Staniewski2009-11-15
| | | | | | | | FS#16623 suggested this change for makepkg; this patch applies it to the remaining files in the scripts directory. Signed-off-by: Cedric Staniewski <cedric@gmx.ca> Signed-off-by: Dan McGee <dan@archlinux.org>
* Add pkgdelta script to create deltas.Xavier Chantry2009-03-15
This should obsolete the delta support in makepkg. Having a separate script should be more flexible. Example usage: $ pkgdelta repo/tzdata-2009a-1-x86_64.pkg.tar.gz repo/tzdata-2009b-1-x86_64.pkg.tar.gz ==> Generating delta from version 2009a-1 to version 2009b-1 ==> Generated delta : 'repo/tzdata-2009a-1_to_2009b-1-x86_64.delta' Signed-off-by: Xavier Chantry <shiningxc@gmail.com>