summaryrefslogtreecommitdiffstats
path: root/contrib
AgeCommit message (Collapse)AuthorFilesLines
2011-12-12Merge branch 'maint'Dan McGee4-2/+56
2011-12-12contrib/paccache: silence possible output from cdDave Reisner1-1/+1
If CDPATH is set, this could possibly write to stdout. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-12pacsysclean: Add new contrib scriptEric Bélanger3-1/+55
pacsysclean sort installed packages by decreasing installed size. It's useful for finding large unused package when doing system clean-up. This script is an improved version of other similar scripts posted on the forums. Thanks goes to Dan for fixing and improving my original script. Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-08Use automake verbose helpers in custom make rulesDan McGee1-11/+8
This converts our script generation to use the built-in AM_V_GEN macro, which honors the V= setting passed to make and allows one to see the full command if they truly desire. The AM_V_at macro is also used in place of an explicit @ so verbose-mode compiles show all commands being run. We can also use these two macros in doc generation to quiet it down to the level we expect. Other minor changes: * a pointless test call is removed in test/pacman/tests/ * sed is used instead of dos2unix as we depend on it anyway * consecutive chmod calls are reduced to a single call (e.g., '+x,a-x') Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-07Merge branch 'maint'Dan McGee1-1/+1
2011-12-07contrib/*: Hardcode program namesLukas Fleischer7-28/+36
Add a read-only variable "$myname" to every contrib script and hardcode program names instead of relying on "$0". The variable name "$myname" was chosen because it is already used in pacman and because we use "$myver" to specify the program version in the official scripts. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-05contrib/paclist: Add "--help" command line parameterLukas Fleischer1-1/+1
Be consistent with all other contrib scripts and support the "--help" command line switch. Fixes FS#27258. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-01Merge branch 'maint'Dan McGee1-0/+3
2011-10-27paccache: add vim modelineDave Reisner1-0/+2
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-10-27paccache: ensure seen/seenarch vars are setDave Reisner1-0/+1
Doesn't do a whole lot of good to compare against values that are never set. Fixes bug where -vvv output wasn't grouping packages together properly. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-10-22Merge branch 'maint'Dan McGee1-1/+1
Conflicts: src/pacman/package.c Signed-off-by: Dan McGee <dan@archlinux.org>
2011-10-21bacman: pkgrel does not have to be an integerlolilolicon1-1/+1
pkgrel, as with pkgver, simply mustn't contain hyphens. Signed-off-by: lolilolicon <lolilolicon@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-10-14Remove -f short option for --forceDan McGee2-4/+4
This is not something that should be used on a frequent basis, and giving it a short option encourages use without making the drawbacks obvious. For the 1% of situations that require it, the 5 extra keystrokes are a fair price to pay. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-10-11PKGBUILD.vim: fix epoch syntax highlightinglolilolicon1-0/+3
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-10-06bacman: use globbing to get local package db pathlolilolicon1-3/+11
The original code- pkg_dir="$(echo $pac_db/$pkg_name-[0-9]*)" is problematic in several ways: - $pac_db and $pkg_name should be quoted, obviously. - It assumes pkgver always starts with an integer, while in fact it just can't contain ':' and '-'. Counterexample: the code breaks on lshw B.02.15-1. - It assumes there are no more than one directory matching the pattern. While this should be the case if everything works perfectly, it certainly relies on external conditions. Counterexample: if the local db contains two packages named foo and foo-3g, even if everything else is perfect, the code will match two directories. Don't make assumptions, use what is known. Signed-off-by: lolilolicon <lolilolicon@gmail.com>
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>