[pacman-dev] [PATCH] Modify bacman to use .pkg.tar.gz suffix

Carlo Bersani carlocci at gmail.com
Wed Jul 2 17:54:31 EDT 2008


We take the extension of the target package from makepkg.conf
Hope this works, thank you all for the git cheat sheet

Signed-off-by: Carlo Bersani <carlocci at gmail.com>
---
 contrib/bacman |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/contrib/bacman b/contrib/bacman
index 410482f..063fdd7 100755
--- a/contrib/bacman
+++ b/contrib/bacman
@@ -88,6 +88,7 @@ fi
 pkg_arch=${CARCH:-'unknown'}
 pkg_dest="${PKGDEST:-$PWD}"
 pkg_pkger=${PACKAGER:-'Unknown Packager'}
+pkg_ext=${PKGEXT:-'.pkg.tar.gz'}
 
 pkg_name="$1"
 pkg_dir="$(echo $pac_db/$pkg_name-[0-9]*)"
@@ -265,7 +266,7 @@ chmod 644 $work_dir/{.PKGINFO,.CHANGELOG,.INSTALL} 2> /dev/null
 echo "Generating the package..."
 
 ret=0
-bsdtar -czf "$pkg_dest/$pkg_namver-$pkg_arch.tar.gz" $(ls -A) || ret=$?
+bsdtar -czf "$pkg_dest/$pkg_namver-$pkg_arch$pkg_ext" $(ls -A) || ret=$?
 if [ $ret -ne 0 ]; then
     echo "ERROR: unable to write package to $pkg_dest"
     echo "       Maybe the disk is full or you do not have write access"
@@ -279,4 +280,4 @@ echo Done
 
 exit 0
 
-# vim: set ts=2 sw=2 noet:
\ No newline at end of file
+# vim: set ts=2 sw=2 noet:
-- 
1.5.6.1





More information about the pacman-dev mailing list