Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=149e2d9e977e5a80cb626f9a61919f2ac04a9ae7

commit 149e2d9e977e5a80cb626f9a61919f2ac04a9ae7
Author: VÖRÖSKŐI András <voros...@frugalware.org>
Date:   Sun May 23 01:06:07 2010 +0200

bash-completion-1.1-1-i686

version bump
remove unused patches
add fpm.diff
updated pacman-g2 (will be moved to pacman-g2 repo)

diff --git a/source/apps/bash-completion/FrugalBuild 
b/source/apps/bash-completion/FrugalBuild
index 3cb42de..e4b08a8 100644
--- a/source/apps/bash-completion/FrugalBuild
+++ b/source/apps/bash-completion/FrugalBuild
@@ -1,38 +1,29 @@
# Compiling time: 0.01 SBU
-# Maintainer: Bence Nagy <nagybe...@tipogral.hu>
+# Maintainer: voroskoi <voros...@frugalware.org>

pkgname=bash-completion
-pkgver=20060301
-pkgrel=8
+pkgver=1.1
+pkgrel=1
pkgdesc="Programmable completion for bash"
-url='http://www.caliban.org/bash/'
+url='http://bash-completion.alioth.debian.org/'
depends=('bash')
groups=('apps')
archs=('i686' 'x86_64' 'ppc')
-up2date="lynx -dump 'http://www.caliban.org/files/bash/?C=M;O=D' | grep 
tar.bz2 | sed -n 's/.*-\(.*\).t.*/\1/; 1 p'"
-source=(http://www.caliban.org/files/bash/$pkgname-$pkgver.tar.bz2 \
-       bash_completion.sh frugalware pacman-g2 \
-       $pkgname-20050721-posix200112.patch \
-       bash-cpmpletion-bzip2_fpm.diff)
-_F_cd_path=bash_completion
-sha1sums=('19521f0fde4d9d06401ccd26ed4ec33d7d3aa23d' \
+up2date="lynx -dump ${url} |Flasttar"
+source=(http://bash-completion.alioth.debian.org/files/${pkgname}-${pkgver}.tar.bz2
 \
+       bash_completion.sh frugalware pacman-g2 fpm.diff)
+sha1sums=('dde4ca656c72adb8326a21f1774dd906f8aaef09' \
'48bbdacd715f5aac9ca8c8906326f5f645d8035e' \
'00f63fffacf0cf69b66febbc615f0f673b9960bd' \
-          'd806d0fb1a37064ef18545885a337c1581c656c6' \
-          'a702e308269df9802c64589337739144ca0bd465' \
-          '29310ca53c46b9633467a5c2a943717d1e90bd34')
+          '1d4c717a7930998ca9b8233e033d8283f835bd38' \
+          'dd7e9d2a897c23e955db856e7a5639c869f82657')
+options=('force') # remove after 1.3
+

build() {
-       cd $Fsrcdir/bash_completion || Fdie
-       Fpatchall
-       Fcd
+       Fbuild

-       Fsed FLAC 'FLAC\|ogv\|flv' bash_completion
-       Fexe bash_completion/bash_completion /etc/bash_completion
Fexe /etc/profile.d/bash_completion.sh
-       Ffile bash_completion/contrib/* /etc/bash_completion.d
Ffile /etc/bash_completion.d/frugalware
Ffile /etc/bash_completion.d/pacman-g2
}
-
-
diff --git 
a/source/apps/bash-completion/bash-completion-20050721-posix200112.patch 
b/source/apps/bash-completion/bash-completion-20050721-posix200112.patch
deleted file mode 100644
index 5bdf680..0000000
--- a/source/apps/bash-completion/bash-completion-20050721-posix200112.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Naur bash_completion.orig/bash_completion bash_completion/bash_completion
---- bash_completion.orig/bash_completion       2004-07-11 20:36:39.000000000 
+0200
-+++ bash_completion/bash_completion    2004-10-15 14:24:47.995790306 +0200
-@@ -5283,7 +5283,7 @@
-                       ;;
-               -*-charset)
-                       COMPREPLY=( $( mkisofs -input-charset help 2>&1 | \
--                                      tail +3 | grep "^$cur") )
-+                                      tail -n +3 | grep "^$cur") )
-                       return 0
-                       ;;
-               -uid)
diff --git a/source/apps/bash-completion/bash-cpmpletion-bzip2_fpm.diff 
b/source/apps/bash-completion/bash-cpmpletion-bzip2_fpm.diff
deleted file mode 100644
index db46287..0000000
--- a/source/apps/bash-completion/bash-cpmpletion-bzip2_fpm.diff
+++ /dev/null
@@ -1,11 +0,0 @@
---- bash_completion.orig       2006-03-01 17:20:18.000000000 +0100
-+++ bash_completion    2007-05-08 11:57:27.000000000 +0200
-@@ -78,7 +78,7 @@
- # Do NOT break these over multiple lines.
- #
- # START exclude -- do NOT remove this line
--complete -f -X '!*.?(t)bz?(2)' bunzip2 bzcat bzcmp bzdiff bzegrep bzfgrep 
bzgrep
-+complete -f -X '!*.@(?(t)bz?(2)|fpm)' bunzip2 bzcat bzcmp bzdiff bzegrep 
bzfgrep bzgrep
- complete -f -X 
'!*.@(zip|ZIP|jar|JAR|exe|EXE|pk3|war|wsz|ear|zargo|xpi|sxw|ott)' unzip zipinfo
- complete -f -X '*.Z' compress znew
- complete -f -X '!*.@(Z|gz|tgz|Gz|dz)' gunzip zcmp zdiff zcat zegrep zfgrep 
zgrep zless zmore
diff --git a/source/apps/bash-completion/fpm.diff 
b/source/apps/bash-completion/fpm.diff
new file mode 100644
index 0000000..ed224bf
--- /dev/null
+++ b/source/apps/bash-completion/fpm.diff
@@ -0,0 +1,21 @@
+diff -aur bash-completion-1.1/bash_completion 
fw_bash-completion-1.1//bash_completion
+--- bash-completion-1.1/bash_completion        2009-10-10 16:26:09.000000000 
+0200
++++ fw_bash-completion-1.1//bash_completion    2010-05-22 19:35:54.000000000 
+0200
+@@ -97,7 +97,7 @@
+ #
+ # START exclude -- do NOT remove this line
+ # bzcmp, bzdiff, bz*grep, bzless, bzmore intentionally not here, see Debian: 
#455510
+-complete -f -X '!*.?(t)bz?(2)' bunzip2 bzcat
++complete -f -X '!*.@(?(t)bz?(2)|fpm)' bunzip2 bzcat
+ complete -f -X 
'!*.@(zip|ZIP|jar|JAR|exe|EXE|pk3|war|wsz|ear|zargo|xpi|sxw|ott|od[fgpst]|epub)'
 unzip zipinfo
+ complete -f -X '*.Z' compress znew
+ # zcmp, zdiff, z*grep, zless, zmore intentionally not here, see Debian: 
#455510
+@@ -105,7 +105,7 @@
+ complete -f -X '!*.Z' uncompress
+ # lzcmp, lzdiff intentionally not here, see Debian: #455510
+ complete -f -X '!*.lzma' lzcat lzegrep lzfgrep lzgrep lzless lzmore unlzma
+-complete -f -X '!*.@(xz|lzma)' unxz xzcat
++complete -f -X '!*.@(xz|lzma|fpm)' unxz xzcat
+ complete -f -X 
'!*.@(gif|jp?(e)g|miff|tif?(f)|pn[gm]|p[bgp]m|bmp|xpm|ico|xwd|tga|pcx|GIF|JP?(E)G|MIFF|TIF?(F)|PN[GM]|P[BGP]M|BMP|XPM|ICO|XWD|TGA|PCX)'
 ee
+ complete -f -X 
'!*.@(gif|jp?(e)g|tif?(f)|png|p[bgp]m|bmp|x[bp]m|rle|rgb|pcx|fits|pm|GIF|JPG|JP?(E)G|TIF?(F)|PNG|P[BGP]M|BMP|X[BP]M|RLE|RGB|PCX|FITS|PM)'
 xv qiv
+ complete -f -X '!*.@(@(?(e)ps|?(E)PS|pdf|PDF)?(.gz|.GZ|.bz2|.BZ2|.Z))' gv ggv 
kghostview
diff --git a/source/apps/bash-completion/pacman-g2 
b/source/apps/bash-completion/pacman-g2
index 8fcb62f..4e64be3 100644
--- a/source/apps/bash-completion/pacman-g2
+++ b/source/apps/bash-completion/pacman-g2
@@ -1,31 +1,22 @@
-# vim: set ft=sh:
-# Bash completion for ArchLinux
-#
-# v.1.1 Manolis Tzanidakis <mtzanida...@freemail.gr>
+# vim: set ft=sh ts=2 sw=2 et:
+# file: /etc/bash_completion.d/pacman-g2
+
+# Bash completion for pacman-g2
+# Based on the pacman (Arch Linux) version
+
+# Original: Manolis Tzanidakis <mtzanida...@freemail.gr>
#
# Distributed under the terms of the GNU General Public License, v2 or later.
#

-## Changelog ####################################################
-#                                                               #
-# * 1.1 (20040117)                                              #
-#   - Code cleanup                                              #
-#   - Updated to pacman-g1 2.7.2-2                              #
-# * 20040216 (orelien)                                          #
-#   - Improved available_{pkgs,groups) functions                #
-#   - Added support for querying groups                         #
-#                                                               #
-#################################################################
-
## initial functions
-#

rem_selected ()
{
# (Adapted from bash_completion by Ian Macdonald <i...@caliban.org>)
# This removes any options from the list of completions that have
# already been specified on the command line.
-  COMPREPLY=($(echo "${comp_wor...@]}" | \
+  COMPREPLY=($(\echo "${comp_wor...@]}" | \
(while read -d ' ' i; do
[ "${i}" == "" ] && continue
# flatten array with spaces on either side,
@@ -35,61 +26,54 @@ rem_selected ()
# remove word from list of completions
COMPREPLY=(${COMPREPLY/ ${i%% *} / })
done
-  echo ${comprep...@]})))
+    \echo ${comprep...@]})))
return 0
}

_available_repos ()
{
-  COMPREPLY=( $( compgen -W "$( grep 'Include' /etc/pacman-g2.conf | grep -v 
-e '^#' | sed 's:.*/etc/pacman-g2/repos/\(.\):\1:' )" -- $cur ) )
+  COMPREPLY=( $( compgen -W "$(\grep '\[' /etc/pacman-g2.conf | \grep -v -e 
'options' -e '^#' | \tr -d '[]' )" -- $cur ) )
}

_installed_pkgs ()
{
local installed_pkgs
-  installed_pkgs=$( ls /var/lib/pacman-g2/local/ )
-  COMPREPLY=( $( compgen -W "$( for i in $installed_pkgs; do echo ${i%-*-*}; 
done )" -- $cur ) )
+  installed_pkgs=$( \ls /var/lib/pacman-g2/local/ )
+  COMPREPLY=( $( compgen -W "$( for i in $installed_pkgs; do \echo ${i%-*-*}; 
done )" -- $cur ) )
}

_available_pkgs ()
{
#find balks easilly on a find /foo/*/* type dir, especially one like
-  #   /var/lib/pacman/*/*
+  #   /var/lib/pacman-g2/*/*
# This little change-up removes the find *and* only uses enabled repos
local available_pkgs
local enabled_repos
-  enabled_repos=$( grep 'Include' /etc/pacman-g2.conf | grep -v -e '^#' | sed 
's:.*/etc/pacman-g2/repos/\(.\):\1:' )
-  available_pkgs=$( for r in $enabled_repos; do echo /var/lib/pacman/$r/*; 
done )
+  enabled_repos=$( \grep '\[' /etc/pacman-g2.conf | \grep -v -e 'options' -e 
'^#' | \tr -d '[]' )
+  available_pkgs=$( for r in $enabled_repos; do \echo 
/var/lib/pacman-g2/sync/$r/*; done )
COMPREPLY=( $( compgen -W "$( for i in $available_pkgs; do j=${i##*/}; echo 
${j%-*-*}; done )" -- $cur ) )
}

_installed_groups ()
{
local installed_groups
-  installed_groups=$( find /var/lib/pacman-g2/local -name desc -exec sed -ne 
'/%GROUPS%/,/^$/{//d; p}' {} \; | sort -u )
-  COMPREPLY=( $( compgen -W "$( for i in $installed_groups; do echo ${i%-*-*}; 
done )" -- $cur ) )
+  installed_groups=$( \find /var/lib/pacman-g2/local -name desc -exec \sed -ne 
'/%GROUPS%/,/^$/{//d; p}' {} \; | \sort -u )
+  COMPREPLY=( $( compgen -W "$( for i in $installed_groups; do \echo 
${i%-*-*}; done )" -- $cur ) )
}

_available_groups ()
{
#find balks easilly on a find /foo/*/* type dir, especially one like
-  #   /var/lib/pacman/*/*
+  #   /var/lib/pacman-g2/*/*
# This little change-up removes the find *and* only uses enabled repos
local available_groups
local enabled_repos
-  enabled_repos=$( grep '\[' /etc/pacman-g2.conf | grep -v -e 'options' -e 
'^#' | tr -d '[]' )
-  available_groups=$( for r in $enabled_repos; do sed '/%GROUPS%/,/^$/{//d; 
p}' /var/lib/pacman/$r/*/desc | sort -u; done )
-  COMPREPLY=( $( compgen -W "$( for i in $available_groups; do echo ${i%-*-*}; 
done )" -- $cur ) )
+  enabled_repos=$( \grep '\[' /etc/pacman-g2.conf | \grep -v -e 'options' -e 
'^#' | tr -d '[]' )
+  available_groups=$( for r in $enabled_repos; do \sed '/%GROUPS%/,/^$/{//d; 
p}' /var/lib/pacman-g2/sync/$r/*/desc | \sort -u; done )
+  COMPREPLY=( $( compgen -W "$( for i in $available_groups; do \echo 
${i%-*-*}; done )" -- $cur ) )
}

-## init (/etc/rc.d) script completion (quick 'n' dirty ;-)
-#
-
-complete -W "start stop restart" \
-  $(for i in /etc/rc.d/*; do echo ${i##*/}; done)
-
## makepkg completion
-#

_makepkg ()
{
@@ -99,30 +83,48 @@ _makepkg ()
prev=${COMP_WORDS[COMP_CWORD-1]}

case "$prev" in
-    -@(p|w))
+    -p)
_filedir
return 0
;;
-    --help|--cleancache|--genmd5)
+    --help|--cleancache)
COMPREPLY=''
return 0
;;
esac

if [[ "$cur" == -* ]]; then
-    COMPREPLY=( $( compgen -W '-b --builddeps \
+    COMPREPLY=( $( compgen -W '\
+      -a --searchdeps \
+      -A \
+      -b --builddeps \
+      -B --nocache \
-c --clean \
-C --cleancache \
-d --nodeps \
+      -D \
+      -e --noextract \
-f --force \
-      -g --genmd5 \
+      -g --gensha1 \
+      -G --wrtsha1 \
-h --help \
-i --install \
+      -j \
+      -l \
-m --nocolor \
-n --nostrip \
+      -o --nobuild \
+      -p \
-r --rmdeps \
+      -R --chroot \
+      -H --host \
-s --syncdeps \
-      -p -w' -- $cur ) )
+      -t --tree \
+      -u --noup2date \
+      -w \
+      --gzip \
+      --noconfirm \
+      --noprogressbar' -- $cur ) )
fi

rem_selected
@@ -130,21 +132,20 @@ _makepkg ()
complete -o default -F _makepkg makepkg

## pacman-g2 completion
-#

_instring ()
{
-    str="${1}"
-    shift 1
-    for c in "$...@}"; do
-        if [ $(expr index "${str}" "${c}") -gt 0 ]; then
-            return 0
-        fi
-    done
-    return 1
+  str="${1}"
+  shift 1
+  for c in "$...@}"; do
+    if [ $(\expr index "${str}" "${c}") -gt 0 ]; then
+      return 0
+    fi
+  done
+  return 1
}

-_pacman_g2 ()
+_pacman-g2 ()
{
local a arg toparse op mod cur
COMPREPLY=()
@@ -152,12 +153,12 @@ _pacman_g2 ()
# This argument parsing is done so we can check for flag existance later
#  right now it's a tad crappy, but does the job
for (( i=1; i < ${#comp_wor...@]}-1; i++ )); do
-       a=${COMP_WORDS[i]}
+    a=${COMP_WORDS[i]}
arg="${a:0:2}"
toparse="${a:2}"

case "${arg}" in
-      -@(A|U|F|R|S|Q|h|V))
+      -@(A|F|Q|R|S|U|V|h))
op="${arg/-}"
mod="${mod}${a:2}"
;;
@@ -165,13 +166,13 @@ _pacman_g2 ()
arg="${a:2}"
case "${arg}" in
add) op="A" ;;
-          remove) op="R" ;;
-          upgrade) op="U" ;;
freshen) op="F" ;;
query) op="Q" ;;
+          remove) op="R" ;;
sync) op="S" ;;
-          help) op="h" ;;
+          upgrade) op="U" ;;
version) op="V" ;;
+          help) op="h" ;;
verbose) mod="${mod}v" ;;
root) mod="${mod}r" ;;
dbpath) mod="${mod}b" ;;
@@ -185,22 +186,25 @@ _pacman_g2 ()
sysupgrade) mod="${mod}u" ;;
downloadonly) mod="${mod}w" ;;
refresh) mod="${mod}y" ;;
+          changelog) mod="${mod}c" ;;
+          deps) mod="${mod}d" ;;
orphans) mod="${mod}e" ;;
+          dependsonly) mod="${mod}e" ;;
+          test) mod="${mod}t" ;;
foreign) mod="${mod}m" ;;
owns) mod="${mod}o" ;;
file) mod="${mod}p" ;;
search) mod="${mod}s" ;;
cascade) mod="${mod}c" ;;
-          nodeps) mod="${mod}d" ;;
-          dbonly) mod="${mod}k" ;;
nosave) mod="${mod}n" ;;
recursive) mod="${mod}s" ;;
+          keep) mod="${mod}k" ;;
esac ;;
*) toparse="${a}" ;;
esac

arglen=$(( ${#toparse}-1 ))
-    for c in $(seq 0 "${arglen}"); do
+    for c in $(\seq 0 "${arglen}"); do
arg=${toparse:$c:1}
[ "${arg}" != "-" ] && mod="${mod}${arg}"
done
@@ -209,61 +213,67 @@ _pacman_g2 ()
cur=${COMP_WORDS[COMP_CWORD]}

if [ $COMP_CWORD -eq 1 ] && [[ "$cur" == -* ]]; then
-        COMPREPLY=( $( compgen -W '\
-            -A --add \
-            -F --freshen \
-            -h --help \
-            -Q --query \
-            -R --remove \
-            -S --sync \
-            -U --upgrade \
-            -V --version \
-            ' -- $cur ) )
-        rem_selected
-        return 0
+    COMPREPLY=( $( compgen -W '\
+      -A --add \
+      -F --freshen \
+      -h --help \
+      -Q --query \
+      -R --remove \
+      -S --sync \
+      -U --upgrade \
+      -V --version \
+      ' -- $cur ) )
+    rem_selected
+    return 0
fi

if [[ "$cur" == -* ]]; then
case "${op}" in
-      A|U|F)
+      A|F|U)
COMPREPLY=( $( compgen -W '\
-           -d --nodeps \
-           -f --force \
-           -h --help \
-           --config \
-           --noconfirm \
-           --noprogressbar \
-           -v --verbose \
-           -r --root \
-           -b --dbpath \
-           ' -- $cur ) )
+          -d --nodeps \
+          -f --force \
+          -h --help \
+          --config \
+          --noarch \
+          --noconfirm \
+          --ask \
+          --noprogressbar \
+          --noscriptlet \
+          --nointegrity \
+          -v --verbose \
+          -r --root \
+          -b --dbpath \
+          ' -- $cur ) )
return 0
-      ;;
+        ;;
R)
COMPREPLY=( $( compgen -W '\
-c --cascade \
+          -k --keep \
+          -n --nosave \
+          -s --recursive \
-d --nodeps \
-f --force \
-h --help \
-          -k --dbonly \
-          -n --nosave \
-          -s --recursive \
-           --config \
-           --noconfirm \
-           --noprogressbar \
+          --config \
+          --noarch \
+          --noconfirm \
+          --ask \
+          --noprogressbar \
+          --noscriptlet \
+          --nointegrity \
-v --verbose \
-r --root \
-b --dbpath \
' -- $cur ) )
return 0
-      ;;
+        ;;
S)
COMPREPLY=( $( compgen -W '\
-c --clean \
-          -d --nodeps \
-          -f --force \
+          -e --dependsonly \
-g --groups \
-          -h --help \
-i --info \
-l --list \
-p --print-uris \
@@ -271,77 +281,97 @@ _pacman_g2 ()
-u --sysupgrade \
-w --downloadonly \
-y --refresh \
-           --config \
-           --noconfirm \
-           --noprogressbar \
+          --ignore \
+          -d --nodeps \
+          -f --force \
+          -h --help \
+          --config \
+          --noarch \
+          --noconfirm \
+          --ask \
+          --noprogressbar \
+          --noscriptlet \
+          --nointegrity \
-v --verbose \
-r --root \
-b --dbpath \
' -- $cur ) )
return 0
-      ;;
+        ;;
Q)
COMPREPLY=( $( compgen -W '\
+          -c --changelog \
-e --orphans \
-g --groups \
-          -h --help \
-i --info \
-l --list \
-m --foreign \
-o --owns \
-p --file \
-s --search \
-           --config \
-           --noconfirm \
-           --noprogressbar \
+          -t --test \
+          -d --nodeps \
+          -f --force \
+          -h --help \
+          --config \
+          --noarch \
+          --noconfirm \
+          --ask \
+          --noprogressbar \
+          --noscriptlet \
+          --nointegrity \
-v --verbose \
-r --root \
-b --dbpath \
' -- $cur ) )
return 0
-      ;;
+        ;;
esac
rem_selected
else
case "${op}" in
-      A|U)
-               COMPREPLY=( $( compgen -d -- "$cur" ) \
+      A|F|U)
+        COMPREPLY=( $( compgen -d -- "$cur" ) \
$( compgen -f -X '!*.fpm' -- "$cur" ) )
return 0
-      ;;
+        ;;
h|V)
COMPREPLY=''
return 0
-      ;;
+        ;;
Q)
if _instring $mod g; then
-            _installed_groups
+          _installed_groups
elif _instring $mod o; then
-                       COMPREPLY=( $( compgen -d -- "$cur" ) \
-                        $( compgen -f -- "$cur" ) )
+          COMPREPLY=( $( compgen -d -- "$cur" ) \
+                      $( compgen -f -- "$cur" ) )
elif _instring $mod p; then
-                       COMPREPLY=( $( compgen -d -- "$cur" ) \
-                        $( compgen -f -X '!*.fpm' -- "$cur" ) )
+          COMPREPLY=( $( compgen -d -- "$cur" ) \
+                      $( compgen -f -X '!*.fpm' -- "$cur" ) )
+        elif _instring $mod u; then
+          COMPREPLY=''
+          return 0
else
-            _installed_pkgs
+          _installed_pkgs
fi
return 0
-      ;;
+        ;;
R)
_installed_pkgs
return 0
-      ;;
+        ;;
S)
if _instring $mod l; then
-            _available_repos
+          _available_repos
else
-            _available_pkgs
+          _available_pkgs
fi
return 0
-      ;;
+        ;;
esac
fi

rem_selected
}
-complete -o filenames -F _pacman_g2 pacman
+complete -o filenames -F _pacman-g2 pacman-g2
+complete -o filenames -F _pacman-g2 pacman
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to