diff options
author | davidovski <david@davidovski.xyz> | 2022-05-28 19:25:31 +0100 |
---|---|---|
committer | davidovski <david@davidovski.xyz> | 2022-05-28 19:25:31 +0100 |
commit | b4febcfcb6432583e63004cfdd452d2714288844 (patch) | |
tree | 620a6e8ce897744e1f24d97d2e47d5bc92f22a84 /xibuild.sh | |
parent | 6e0fd4047f5dbc3bff3c54b4b7fd016d343d3b1d (diff) |
added revision number to the pkginfo
Diffstat (limited to 'xibuild.sh')
-rw-r--r-- | xibuild.sh | 18 |
1 files changed, 7 insertions, 11 deletions
@@ -70,16 +70,11 @@ EOF extract () { f=$1 - case "${f}" in - *".tar"*) - case "${f##*.}" in - "gz" ) tar -zxf $f;; - "lz" ) tar --lzip -xf "$f" ;; - * ) tar -xf $f ;; - esac - ;; - *".tgz" ) tar -xf $f ;; - *".zip" ) unzip -qq -o $f ;; + case "$(file $f)" in + *"gzip"*) tar -zxf $f;; + *"XZ"*) tar -Jxf $f;; + *"bzip2"*) tar -jxf $f;; + *"Zip"*) unzip -qq -o $f ;; esac } @@ -116,7 +111,7 @@ xibuild_fetch () { for url in $ADDITIONAL; do case $url in - http*|ftp*) fetch_source $url;; + *'://'*) fetch_source $url;; *) fetch_source file://$src_dir/$url esac done @@ -187,6 +182,7 @@ xibuild_describe () { echo "PKG_FILE=$name.xipkg" echo "CHECKSUM=$(sha512sum $xipkg | awk '{ print $1 }')" echo "VERSION=$pkg_ver" + echo "REVISION=$(cat ${buildfile%/*}/*.xibuild | sha512sum | cut -d' ' -f1)" echo "SOURCE=$SOURCE" echo "DATE=$(stat -t $xipkg | cut -d' ' -f13 | xargs date -d)" echo "DEPS=${DEPS}" |