release 874 Bytes
Newer Older
gerd's avatar
gerd committed
1 2 3 4 5 6
#! /bin/sh

set -e

version=`./configure -version 2>/dev/null`
destdir="pxp-$version"
gerd's avatar
gerd committed
7 8
trunk="https://godirepo.camlcity.org/svn/lib-pxp/trunk"
tag="https://godirepo.camlcity.org/svn/lib-pxp/tags/$destdir"
gerd's avatar
gerd committed
9

gerd's avatar
gerd committed
10
#echo "Ensure the gensrc-pre lexers are up to date!"
gerd's avatar
gerd committed
11

gerd's avatar
gerd committed
12 13 14
mkdir -p packages
rm -rf "packages/$destdir"
makepkg -spec pxp.files -intree . -outtree "packages/$destdir"
gerd's avatar
gerd committed
15
touch "packages/$destdir/gensrc/pxp-wlex-utf8/gen_done"
gerd's avatar
gerd committed
16 17
(cd packages; tar czf "$destdir.tar.gz" "$destdir")

gerd's avatar
gerd committed
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
# Checking for svn:

status=$(svn status | grep -v '^\?' || true )

if [ -n "$status" ]; then
    echo "Error: svn status not clean"
    exit 1
else
    printf "Tag revision (y/n)? "
    read answer
    case "$answer" in
        y|Y|yes|YES)
            svn cp "$trunk" "$tag"
            echo "New tag: $tag"
            ;;
        *)
            echo "Nothing tagged."
            ;;
    esac
fi