mkports

recipes for building multiple softwares with mk(1)
git clone git://z3bra.org/mkports
Log | Files | Refs

commit fbe169dcb98861dbe7ebb747cdbac299304bd471
parent 8cf56ffdd0376c17c73cc2a2b780bdcdc277f75d
Author: z3bra <contactatz3bradotorg>
Date:   Fri May 12 08:33:30 +0200

Add TAR variable to allow changing it

Diffstat:
default.mk | 10+++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/default.mk b/default.mk @@ -11,7 +11,7 @@ $tarball:Q: mk fetch patch build install cleanup cd $destdir mkdir -p $(dirname $tarball) - tar -c `ls -1` | bzip2 -c > $tarball + ${TAR} -cjf $tarball `ls -1` # recipe trying to follow the most common pattern in software # building @@ -66,12 +66,12 @@ fetch-archive:QV: $WORK/$archive if [ -n "$url" ]; then cd $WORK case $archive in - *.tar.bz2) opt="-xvj" ;; - *.tar.gz|*.tgz) opt="-xvz" ;; - *.tar.xz) opt="-xvJ" ;; + *.tar.bz2|*.tbz) opt="-xvj" ;; + *.tar.gz|*.tgz) opt="-xvz" ;; + *.tar.xz|*.txz) opt="-xvJ" ;; *) echo "$archive: format not recognized" >&2; exit 1 esac - src=$(tar $opt < $archive|sed -n 1p|cut -f1 -d/) + src=$(${TAR} $opt -f $archive|sed -n 1p|cut -f1 -d/) if [ "$src" != "$pkg-$ver" ]; then mv "$src" "$pkg-$ver" fi