summaryrefslogtreecommitdiff
path: root/contrib
Commit message (Collapse)AuthorAge
* bacman: indent code using TABlolilolicon2011-10-06
| | | | | | | 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>
* paccache: proper quoting in [[ expression ]]lolilolicon2011-09-30
| | | | | | | | 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>
* paccache: declare variables explicitlylolilolicon2011-09-30
| | | | | | | | 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>
* paccache: allow strictly integer for -k optionlolilolicon2011-09-29
| | | | | | | | | | | | | | 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>
* bash_completion: add completion for pacman-keyDave Reisner2011-09-26
| | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* paccache: remove unnecessary if checkDave Reisner2011-09-18
| | | | | | | 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>
* paccache: escape . in trimming of diskspace stringDave Reisner2011-09-11
| | | | | | | | | | 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>
* bash_completion: add dbonly to sync optionsDave Reisner2011-08-19
| | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Add makepkg -S which is an alias to makepkg --sourceSebastien Luttringer2011-08-18
| | | | | | | | 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>
* Fix trailing whitespace in whole codebaseDan McGee2011-08-17
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* build-sys: always use $(RM) instead of rm -fDave Reisner2011-08-15
| | | | | | | 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>
* Attempt to update zsh_completionDan McGee2011-08-11
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* bash_completion: update for adjusted optionsDave Reisner2011-08-11
| | | | | | | | 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>
* paccache: use pacsort instead of sort -VDave Reisner2011-08-08
| | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* contrib/paccache: misc cleanup and bugfixDave Reisner2011-08-08
| | | | | | | | | | * 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>
* paccache: add new contrib scriptDave Reisner2011-08-02
| | | | | | | | | | 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>
* contrib/pacsearch: skip non-matching linesDan McGee2011-07-27
| | | | | | | This prevents some perl errors from popping up when pacman prints error or warning messages. Signed-off-by: Dan McGee <dan@archlinux.org>
* contrib: add paclog-pkglist to gitignoreDan McGee2011-07-21
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* PKGBUILD.vim: add new var and assert bash syntaxDave Reisner2011-07-18
| | | | | | | * assert is_bash to pickup more valid syntax * add checkdepends highlighting Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* contrib/paclog-pkglist: whitespace cleanupDave Reisner2011-07-18
| | | | | | | 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>
* contrib/paclog-pkglist: rework as bash wrapping awkDave Reisner2011-07-18
| | | | | | | | | | 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>
* contrib/paclog-pkglist: new contributionDave Reisner2011-07-14
| | | | | | | | 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>
* contrib/bash_completion: update with new makepkg optsDave Reisner2011-07-14
| | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: remove unused -C option from option listDave Reisner2011-07-14
| | | | | | | 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>
* contrib/paclist: rewrite in bashDave Reisner2011-07-05
| | | | | | | | | | | | | 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>
* 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>
* Merge branch 'maint'Dan McGee2011-04-15
|\ | | | | | | | | | | | | | | Conflicts: lib/libalpm/alpm.h lib/libalpm/trans.c Signed-off-by: Dan McGee <dan@archlinux.org>
| * bacman: fix the fact that the depends file no longer existsDan McGee2011-04-09
| | | | | | | | | | | | Addresses FS#23641. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Rely on the return value of type instead of its outputDave Reisner2011-03-27
| | | | | | | | | | Signed-off-by: Dave Reisner <d@falconindy.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2011-03-21
|\| | | | | | | | | | | | | | | Conflicts due to change in return calling style. Conflicts: src/pacman/pacman.c src/pacman/sync.c
| * Some more zsh completion tidy upAllan McRae2011-03-21
| | | | | | | | | | | | | | Changes for consistency across functions Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
| * Fix zsh completionAllan McRae2011-03-21
| | | | | | | | | | | | | | | | 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>
* | remove antiquated contrib/wget-xdelta.shDave Reisner2011-03-17
|/ | | | | | | | 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>
* contrib/Makefile.am: don't simplify what you don't understandDan McGee2011-03-16
| | | | | | | | 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>
* pkgsearch: handle non-matching lines gracefullyDan McGee2011-01-24
| | | | | | | | | 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>
* Update contrib/ MakefileDan McGee2011-01-24
| | | | | | | | 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>
* Remove epoch as an independent fieldDan McGee2011-01-21
| | | | | | | | | | | | | | 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>
* makepkg: add option to clear buildflagsAllan McRae2010-12-29
| | | | | | | | | | 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>
* contrib: remove bash pactreeXavier Chantry2010-12-12
| | | | | | This has been rewitten in C which is much much faster. Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com>
* Merge branch 'maint'Dan McGee2010-12-12
|\ | | | | | | | | | | Conflicts: lib/libalpm/be_local.c lib/libalpm/trans.c
| * PKGBUILD.vim: add special licenses BSD MIT ZLIB PythonXavier Chantry2010-10-28
| | | | | | | | | | Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | bash_completion: remove upstream deprecated functionsCarlos Diaz2010-10-14
| | | | | | | | | | | | | | | | | | 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>
* | Update contrib/ for epochDan McGee2010-10-13
| | | | | | | | 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>
* | contrib/ follow-up workDan McGee2010-10-12
| | | | | | | | | | | | | | | | | | | | * 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>
* | 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>
* | Add .in extension to files in contribNezmer2010-10-11
| | | | | | | | | | | | | | 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>
* | Remove use of `seq` in pactreeDan McGee2010-10-11
|/ | | | | | | | | | | | | | This is not a bash builtin, so can potentially cause portability issues. Additionally, the use of it is completely unnecessary as it can all be done within bash (and done faster). $ time pactree xfwm4 >/dev/null (old version) real 0m3.245s $ time ./contrib/pactree xfwm4 >/dev/null (new version) real 0m3.042s Signed-off-by: Dan McGee <dan@archlinux.org>
* bacman: unify package creation with makepkgAllan McRae2010-09-15
| | | | | | | | | | | | | Currently bacman always compresses with gzip now matter what PKGEXT is set to. Rework the entire package creation process to be similar to that in makepkg. This also make the explicit assumption that PKGEXT is defined in makepkg.conf. Thanks to Nelson Chan <khcha.n.el@gmail.com> for the original patch to fix the incorrect package compression. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* bash_completion: negate expression inside bracketsDave Reisner2010-07-27
| | | | | | | Avoids letting the shell evaluate ! as something else (e.g. an alias). Signed-off-by: Dave Reisner <d@falconindy.com> Signed-off-by: Dan McGee <dan@archlinux.org>