summaryrefslogtreecommitdiffstats
path: root/archrelease
blob: e92a76f77593c77d99f939f9f9e01e1d05f1f560 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash

if [ "$1" = "" ]; then
    echo "Usage: archrelease <repo>"
    exit 1
fi

if [ ! -f PKGBUILD ]; then
    echo "archrelease: PKGBUILD not found"
    exit 1
fi

if [ "$(basename $(readlink -f .))" != "trunk" ]; then
    echo "archrelease: Not in a package trunk dir"
    exit 1
fi

if [ "$(svn diff)" != "" ]; then
    echo "archrelease: You have not committed your changes yet!"
    echo "             Please run 'upgpkg' or 'svn commit' first"
    exit 1
fi

echo -n 'releasing package...'
pushd .. >/dev/null
if [ -d repos/$1 ]; then
    svn rm --force -q repos/$1
    svn commit -q -m "archrelease: remove $1"
fi
svn copy -q -r HEAD trunk repos/$1
svn commit -q -m "archrelease: copy trunk to $1"
popd >/dev/null
echo 'done'