1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-12-22 07:48:50 -05:00
pacman/contrib
lolilolicon 22abe27bfa bacman: use globbing to get local package db path
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-06 02:10:25 -05:00
..
.gitignore paccache: add new contrib script 2011-08-02 08:24:06 -04:00
bacman.in bacman: use globbing to get local package db path 2011-10-06 02:10:25 -05:00
bash_completion.in bash_completion: add completion for pacman-key 2011-09-26 16:02:19 -05:00
Makefile.am build-sys: always use $(RM) instead of rm -f 2011-08-15 13:05:27 -05:00
paccache.in paccache: proper quoting in [[ expression ]] 2011-09-30 10:48:49 -05:00
pacdiff.in fix vim syntax highlighting of .sh files 2011-06-30 10:44:45 -05:00
paclist.in contrib/paclist: rewrite in bash 2011-07-05 21:37:18 -05:00
paclog-pkglist.in contrib/paclog-pkglist: whitespace cleanup 2011-07-18 10:35:12 -05:00
pacscripts.in fix vim syntax highlighting of .sh files 2011-06-30 10:44:45 -05:00
pacsearch.in contrib/pacsearch: skip non-matching lines 2011-07-27 12:44:17 -05:00
PKGBUILD.vim PKGBUILD.vim: add new var and assert bash syntax 2011-07-18 11:50:47 -04:00
README remove antiquated contrib/wget-xdelta.sh 2011-03-17 10:05:33 -05:00
vimprojects contrib/ follow-up work 2010-10-12 08:26:50 -05:00
zsh_completion.in Fix trailing whitespace in whole codebase 2011-08-17 17:03:19 -05:00

Here is a brief description of the files included in this directory:

PKGBUILD.vim - a vim/gvim syntax file for PKGBUILDs. Colors known variable
names, highlights common errors such as invalid characters in pkgname or
pkgver, etc.

bash_completion - a bash completion script for pacman, install in
/etc/bash_completion.d/ for use (but rename to something descriptive!).

zsh_completion - a zsh completion script, install (with a rename) to
/usr/share/zsh/site-functions/.

pacdiff - a simple pacnew/pacorig/pacsave updater for /etc/.

paclist - list all packages installed from a given repository. Useful for
seeing which packages you may have installed from the testing repository,
for instance.

pacscripts - tries to print out the {pre,post}_{install,remove,upgrade}
scripts of a given package.

pacsearch - a colorized search combining both -Ss and -Qs output. Installed
packages are easily identified with a *** and local-only packages are also
listed.

bacman - regenerate a pacman package based on installed files and the pacman
database entries. Useful for reuse, or possible config file extension.

vimprojects - a project file for the vim project plugin.