4 repo_url=https://github.com/eventum/eventum
18 # use tarball from "snapshot" build
19 git fetch "$repo_url" refs/tags/snapshot
20 out=$(git show FETCH_HEAD -s)
21 tarball=$(echo "$out" | grep -o 'eventum-.*\.tar.gz')
22 url="$repo_url/releases/download/snapshot/$tarball"
23 test -f "$tarball" || wget -c $url
30 echo "Using $rev (subver: $subver, githash: $githash)..."
32 oldsubver=$(awk '/^%define[\t ]+subver[\t ]+/{print $NF}' $specfile)
33 oldgithash=$(awk '/^%define[\t ]+githash[\t ]+/{print $NF}' $specfile)
34 if [ "$oldsubver" = "$subver" -a "$oldgithash" = "$githash" ]; then
35 echo "Already up to date"
39 echo "Updating $specfile for $rev (subver: $subver, githash: $githash)..."
41 s/^[#%](define[ \t]+subver[ \t]+)[0-9]+\$/%\1$subver/
42 s/^[#%](define[ \t]+githash[ \t]+)[0-9a-fg]+\$/%\1$githash/
44 ../builder -ncs -5 $specfile