summaryrefslogtreecommitdiffstats
path: root/contrib
AgeCommit message (Collapse)AuthorFilesLines
2011-10-06bacman: add tar.Z package creation supportlolilolicon1-9/+3
bacman should support whatever makepkg does as PKGEXT. Also remove obsolete $EXT variable. Signed-off-by: lolilolicon <lolilolicon@gmail.com>
2011-10-06bacman: small code cleanuplolilolicon1-10/+11
This includes: - Quoting fixes. - Drop deprecated mktemp option -p. - Set extglob nullglob shell options at the top. - Use extended globbing instead of regex to match %HEADER% in pacman db. Signed-off-by: lolilolicon <lolilolicon@gmail.com>
2011-10-06bacman: bashify using [[ ]] and (( ))lolilolicon1-22/+22
Another style change. The [[ expression ]] form is particularly cleaner, safer and more powerful than the [ expression ] form. Signed-off-by: lolilolicon <lolilolicon@gmail.com>
2011-10-06bacman: indent code using TABlolilolicon1-140/+138
As every piece of code in the whole project uses TAB as indentation character, bacman shouldn't be an exception. Signed-off-by: lolilolicon <lolilolicon@gmail.com>
2011-09-30paccache: proper quoting in [[ expression ]]lolilolicon1-1/+1
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> Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-09-30paccache: declare variables explicitlylolilolicon1-1/+1
Declare and initialize integer variables 'needsroot' and 'verbose'. Don't use the fact that (( undefined_variable )) evaluates to 0. Signed-off-by: lolilolicon <lolilolicon@gmail.com> Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-09-29paccache: allow strictly integer for -k optionlolilolicon1-3/+5
Verify the argument to -k is a non-negative integer. Leading zeros are simply stripped. 'declare -i keep' allowed the argument to -k to be any arithmetic evaluation expression. The simple assignment 'keep=$OPTARG' triggers arithmetic evaluation implicitly, which can either consume a huge amount of resources with input such as '2**2**32' or immediately produce an error on invalid input. Instead, we simply 'declare -- keep' and avoid all that. Signed-off-by: lolilolicon <lolilolicon@gmail.com> Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-09-26bash_completion: add completion for pacman-keyDave Reisner1-0/+16
Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-09-18paccache: remove unnecessary if checkDave Reisner1-4/+2
This is superfluous as the ensuing for loop will exit immediately on the same condition avoided by the if. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-09-11paccache: escape . in trimming of diskspace stringDave Reisner1-1/+1
Before: ==> finished dry run: 2 candidates (diskspace saved: 7. MiB) After: ==> finished dry run: 2 candidates (diskspace saved: 7.8 MiB) Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-08-20bash_completion: add dbonly to sync optionsDave Reisner1-1/+1
Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-18Add makepkg -S which is an alias to makepkg --sourceSebastien Luttringer1-1/+1
makepkg --source is a often used go make source package like for AUR. Have a -S shortcut will save the world. Signed-off-by: Sebastien Luttringer <seblu@seblu.net> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-18Fix trailing whitespace in whole codebaseDan McGee1-4/+4
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-15build-sys: always use $(RM) instead of rm -fDave Reisner1-2/+2
These are equivalent. Use the autoconf macro for consistency. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-11Attempt to update zsh_completionDan McGee1-1/+7
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-11bash_completion: update for adjusted optionsDave Reisner1-3/+3
Remove -k option excepting query operations and add --recursive for sync and upgrade operations. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-08paccache: use pacsort instead of sort -VDave Reisner1-2/+2
Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-08contrib/paccache: misc cleanup and bugfixDave Reisner1-13/+22
* change error verbiage when run as root * delete sigs along with packages * fix bug in diskspace calculations * merge END block in pkgfilter Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-02paccache: add new contrib scriptDave Reisner3-0/+296
paccache is a robust and flexible package cache cleaner with a variety of options. Much credit goes to DJ Mills and Pat Brisbin for ideas behind this script. Signed-off-by: Dave Reisner <dreisner@archlinux.org> [Dan: add .gitignore entry] Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-27contrib/pacsearch: skip non-matching linesDan McGee1-0/+2
This prevents some perl errors from popping up when pacman prints error or warning messages. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-21contrib: add paclog-pkglist to gitignoreDan McGee1-0/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-18PKGBUILD.vim: add new var and assert bash syntaxDave Reisner1-0/+7
* assert is_bash to pickup more valid syntax * add checkdepends highlighting Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-07-18contrib/paclog-pkglist: whitespace cleanupDave Reisner1-25/+25
add a modeline and change 2 space indent to a tab. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-18contrib/paclog-pkglist: rework as bash wrapping awkDave Reisner2-10/+23
Avoid some pain in awk's limited handling of command line arguments by wrapping this in a Bash script. We also default to @localstatedir@/log/pacman.log when no args are specified, meaning that -h or --help is required to get the help message. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-14contrib/paclog-pkglist: new contributionDave Reisner2-0/+58
converts a pacman log file to a list of installed packages, which should match the output of `pacman -Q'. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-14contrib/bash_completion: update with new makepkg optsDave Reisner1-3/+3
Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-14makepkg: remove unused -C option from option listDave Reisner1-3/+3
We nuke it from the completion file as well along with its longopt. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-07-06contrib/paclist: rewrite in bashDave Reisner1-65/+20
The original concept for this script was a bash implementation, but turned out to be unreasonable at the time due to the efficiencies of the database format. Since those have been resolved, we can rewrite this in bash as a much simpler script. All the action happens in a single line, but we add extend this a little, binding to gettext to keep our pacman translations intact. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-30fix vim syntax highlighting of .sh filesFlorian Pritz4-4/+4
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-04-16Merge branch 'maint'Dan McGee1-9/+7
Conflicts: lib/libalpm/alpm.h lib/libalpm/trans.c Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-10bacman: fix the fact that the depends file no longer existsDan McGee1-9/+7
Addresses FS#23641. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-28Rely on the return value of type instead of its outputDave Reisner1-1/+1
Signed-off-by: Dave Reisner <d@falconindy.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-21Merge branch 'maint'Dan McGee1-14/+12
Conflicts due to change in return calling style. Conflicts: src/pacman/pacman.c src/pacman/sync.c
2011-03-21Some more zsh completion tidy upAllan McRae1-1/+2
Changes for consistency across functions Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-21Fix zsh completionAllan McRae1-13/+10
Fixes completion for "pacman -S <tab>" and "pacman -S repo/<tab>" Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-17remove antiquated contrib/wget-xdelta.shDave Reisner3-77/+1
Support for this script was removed in makepkg by commit b4e1365. Delta creation support has been provided by scripts/pkgdelta. Signed-off-by: Dave Reisner <d@falconindy.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-03-16contrib/Makefile.am: don't simplify what you don't understandDan McGee1-7/+17
This was totally screwed under a 'make distcheck' invocation. Bring it inline with what we have (and what works!) in scripts/Makefile.am. This was broken/introduced in commit 05f0a28932. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-24pkgsearch: handle non-matching lines gracefullyDan McGee1-3/+9
Before any non-matching line would trigger some perl warnings about undefined variables. If a line doesn't match, just show it to the user unprocessed; this is seen with warning and error messages pacman not so helpfully emits on stdout rather than stderr. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-24Update contrib/ MakefileDan McGee2-1/+10
We didn't have the proper dependencies specified for our scripts after the move to *.in extensions, so a change to a file didn't trigger a rebuild. Also remove old stuff from .gitignore. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-01-22Remove epoch as an independent fieldDan McGee1-6/+0
Instead, go the same route we have always taken with version-release in libalpm and treat it all as one piece of information. Makepkg is the only script that knows about epoch as a distinct value; from there on out we will parse out the components as necessary. This makes the code a lot simpler as far as epoch handling goes. The downside here is that we are tossing some compatibility to the wind; packages using force will have to be rebuilt with an incremented epoch to keep their special status. Signed-off-by: Dan McGee <dan@archlinux.org>
2010-12-30makepkg: add option to clear buildflagsAllan McRae1-1/+1
Add the "buildflags" option, which is useful in its negative form for disabling CFLAGS, CXXFLAGS and LDFLAGS when building a package. This is useful when determining of one of these flags is causing an issue with a package. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-12-13contrib: remove bash pactreeXavier Chantry3-327/+0
This has been rewitten in C which is much much faster. Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com>
2010-12-13Merge branch 'maint'Dan McGee1-3/+6
Conflicts: lib/libalpm/be_local.c lib/libalpm/trans.c
2010-10-28PKGBUILD.vim: add special licenses BSD MIT ZLIB PythonXavier Chantry1-3/+6
Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-14bash_completion: remove upstream deprecated functionsCarlos Diaz1-4/+2
Populate $cur and $prev with the new bash-completion 1.2 function, _get_comp_words_by_ref. _get_cword and _get_pword have been deprecated. Signed-off-by: Carlos Diaz <839273@gmail.com>
2010-10-14Update contrib/ for epochDan McGee2-2/+11
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-14Fix bash shell location checkDan McGee6-6/+6
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-12contrib/ follow-up workDan McGee4-5/+13
* Add a .gitignore file * Use the same 'GEN' output we have in the scripts/ Makefile when doing our edits on the .in files * Remove PKGBUILD.vim and vimprojects from our edit list, they have no need to be in the list Signed-off-by: Dan McGee <dan@archlinux.org>
2010-10-12Use sysconfdir, localstatedir, BASH instead of hardcoded valuesNezmer7-34/+63
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>
2010-10-12Add .in extension to files in contribNezmer11-0/+0
This is needed If we want to use sysconfdir,localstatedir and other variables. Signed-off-by: Nezmer <git@nezmer.info> Signed-off-by: Dan McGee <dan@archlinux.org>