summaryrefslogtreecommitdiffstats
path: root/scripts/pkgdelta.sh.in
AgeCommit message (Collapse)AuthorFilesLines
2017-04-04Replace @SIZECMD@ with POSIX-compatible commandDrew DeVault1-2/+2
Now uses wc -c $file | cut -d' ' -f1, which works using only POSIX commands and removes the need for any platform-specific usages. Signed-off-by: Drew DeVault <sir@cmpwn.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2016-10-22makepkg: Move parseopts from library to libmakepkgAlad Wenter1-1/+6
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>
2015-01-02pkgdelta: Use high compression options offered by xdelta3Mohammad Alsaleh1-1/+1
* 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>
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-11-15Improve --help switch output for pacman contrib and pacman scriptsJason St. John1-4/+7
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-03-14pkgdelta: fix improper passing of file argumentDave Reisner1-2/+3
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>
2013-03-08scripts: Add color to pkgdeltaWilliam Giokas1-1/+7
Signed-off-by: William Giokas <1007380@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2012-12-14pkgdelta: avoid use of eval and IFS manipulationDave Reisner1-16/+12
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>
2012-09-18pkgdelta: pass correct args to create_deltaDave Reisner1-1/+1
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>
2012-06-26pkgdelta: use human_to_size to parse --min-pkg-sizeDave Reisner1-6/+7
Update the documentation accordingly to mention that users can expect huamn readable sizes to be acceptable. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-06-26pkgdelta: add missing --version longoptDave Reisner1-1/+1
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>
2012-05-21Merge branch 'maint'Dan McGee1-3/+3
Conflicts: scripts/pacman-key.sh.in
2012-05-21pkgdelta: adopt parseopts for option parsingDave Reisner1-14/+24
Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-20Fix gettext usage in pkgdelta help instructionsDan McGee1-3/+3
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-24Merge branch 'maint'Dan McGee1-22/+77
Conflicts: scripts/repo-add.sh.in
2012-04-21pkgdelta/repo-add: quoting fixesFlorian Pritz1-1/+1
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>
2012-04-21pkgdelta: implement requirments for delta generationFlorian Pritz1-3/+49
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>
2012-04-21pkgdelta: rework option/argument parserFlorian Pritz1-18/+27
Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-07Merge branch 'maint'Dan McGee1-3/+3
Conflicts: lib/libalpm/signing.c lib/libalpm/sync.c
2012-04-07pkgdelta: exit 1 upon errorFlorian Pritz1-2/+2
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>
2012-04-07pkgdelta: use bsdtar -q optionDan McGee1-1/+1
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>
2012-01-31Merge branch 'maint'Dan McGee1-4/+4
Conflicts: scripts/makepkg.sh.in
2012-01-31scripts: always use printf with embedded gettextDave Reisner1-4/+4
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>
2011-12-07scripts/*: Declare several constant variables read-onlyLukas Fleischer1-1/+1
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>
2011-09-28pkgdelta: proper quoting in [[ expression ]]lolilolicon1-3/+3
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>
2011-08-11scripts/pkgdelta: fix `make distcheck`Dan McGee1-1/+3
--help and --version are required by the sanity checks performed by `make distcheck`. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-28scripts/pkgdelta: exit properly on missing argsDave Reisner1-2/+1
Removes usage of 'nounset' which, when combined with 'errexit' can cause undesirable early exits. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-06-30fix vim syntax highlighting of .sh filesFlorian Pritz1-1/+1
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>
2011-06-24po/: split into scripts/po/ and src/pacman/po/Dan McGee1-1/+1
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>
2011-06-15scripts: refactor output formatting functionsAllan McRae1-15/+1
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>
2011-06-08pkgdelta: add vim modelineAllan McRae1-0/+2
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-03-01Fix some easy to find double translationsDan McGee1-2/+2
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>
2010-10-14Fix bash shell location checkDan McGee1-1/+1
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>
2010-10-12Use sysconfdir, localstatedir, BASH instead of hardcoded valuesNezmer1-1/+1
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>
2009-11-16scripts: replace test builtin [ with shell keywords [[ and ((Cedric Staniewski1-11/+11
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>
2009-03-15Add pkgdelta script to create deltas.Xavier Chantry1-0/+165
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>