index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Aaron Griffin <aaron@archlinux.org> | 2006-12-21 01:53:40 +0000 |
---|---|---|
committer | Aaron Griffin <aaron@archlinux.org> | 2006-12-21 01:53:40 +0000 |
commit | 74e347f09bd62872de84b431dcf029090931d199 (patch) | |
tree | 966f7b6b2a35ccaecb61b2119f28a2bad2340a96 /scripts/re-pacman | |
parent | b1fbcd3ab5cf16b668cfc72d90223f48a329605b (diff) |
-rw-r--r-- | scripts/re-pacman | 50 |
diff --git a/scripts/re-pacman b/scripts/re-pacman index 74c77ac2..350fe865 100644 --- a/scripts/re-pacman +++ b/scripts/re-pacman @@ -25,40 +25,38 @@ #TODO # * Check for md5 changes in backup lines and change pkgrel -pacinfo () -{ - [ $# -ne 2 ] && return 1 - #use echo to strip spaces - echo $(pacman -Qi ${1} | grep "${2}" | cut -d: -f2-) +pacinfo () { + [ $# -ne 2 ] && return 1 + #use echo to strip spaces + echo $(pacman -Qi ${1} | grep "${2}" | cut -d: -f2-) } -make_pkginfo () -{ - echo "# Generated by re-pacman 1.0.0" - echo "# On $(date)" - echo "pkgname =$(pacinfo ${1} Name)" - echo "pkgver =$(pacinfo ${1} Version)" - echo "pkgdesc =$(pacinfo ${1} Description)" - echo "url =$(pacinfo ${1} URL)" - echo "builddate =$(pacinfo ${1} 'Build Date')" - echo "packager =$(pacinfo ${1} Packager)" - echo "size =$(pacinfo ${1} Size)" - echo "arch =$(pacinfo ${1} Architecture)" - deps=$(pacinfo ${1} 'Depends On') - for d in ${deps}; do - echo "depend = ${d}" - done +make_pkginfo () { + echo "# Generated by re-pacman 1.0.0" + echo "# On $(date)" + echo "pkgname =$(pacinfo ${1} Name)" + echo "pkgver =$(pacinfo ${1} Version)" + echo "pkgdesc =$(pacinfo ${1} Description)" + echo "url =$(pacinfo ${1} URL)" + echo "builddate =$(pacinfo ${1} 'Build Date')" + echo "packager =$(pacinfo ${1} Packager)" + echo "size =$(pacinfo ${1} Size)" + echo "arch =$(pacinfo ${1} Architecture)" + deps=$(pacinfo ${1} 'Depends On') + for d in ${deps}; do + echo "depend = ${d}" + done } if [ $# -ne 1 ]; then - echo "usage: re-pacman <installed package name>" - exit 1 + echo "usage: re-pacman <installed package name>" + exit 1 fi ver=$(pacinfo ${1} Version) if [ "x${ver}" = "x" ]; then - echo "Package '${1}' not found, aborting." - exit 1 + echo "Package '${1}' not found, aborting." + exit 1 fi echo ":: Cleaning up old files" @@ -77,3 +75,5 @@ echo ${flist} | tr ' ' '\n' | tar czf "${1}-${ver}.pkg.tar.gz" -T - 2>/dev/null rm -f .PKGINFO .FILELIST echo ":: Package '${1}-${ver}.pkg.tar.gz' is now ready for installation" + +# vim: set ts=2 sw=2 noet: |