]> git.pld-linux.org Git - packages/eventum.git/blobdiff - update-source.sh
support tar.xz source
[packages/eventum.git] / update-source.sh
index 9c8c607af128e201ba3ce5074aa87845f75e74a6..c006f34a5a270eb5056d6c1dcbefa51fed3f74d8 100755 (executable)
@@ -10,15 +10,20 @@ cd "$dir"
 
 if [ -f "$1" ]; then
        rev=$1
+       version=${rev#eventum-}
+       version=${version%%-*}
        rev=${rev#eventum-*-}
        rev=${rev%.tar.gz}
+       rev=${rev%.tar.xz}
 elif [ "$1" ]; then
        rev=$1
 else
        # use tarball from "snapshot" build
        git fetch "$repo_url" refs/tags/snapshot
+       # save this under some local ref, so repeated calls don't have to fetch everything
+       git update-ref refs/keep-around/snapshot FETCH_HEAD
        out=$(git show FETCH_HEAD -s)
-       tarball=$(echo "$out" | grep -o 'eventum-.*\.tar.gz')
+       tarball=$(echo "$out" | grep -oE 'eventum-.*\.tar.(gz|xz)')
        url="$repo_url/releases/download/snapshot/$tarball"
        test -f "$tarball" || wget -c $url
        exec "$0" "$tarball"
@@ -42,3 +47,5 @@ sed -i -re "
        s/^[#%](define[ \t]+githash[ \t]+)[0-9a-fg]+\$/%\1$githash/
 " $specfile
 ../builder -ncs -5 $specfile
+
+git commit -am "up to $version-$rev"
This page took 0.126834 seconds and 4 git commands to generate.