blob: cd1bcfeb04e8e30e3ac89e1a6098040561d4e485 (
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
abort() {
echo ${1:-'archrelease: Cancelled'}
exit 1
}
if [ "$1" = '' ]; then
abort 'Usage: archrelease <repo>'
fi
if [ ! -f PKGBUILD ]; then
abort 'archrelease: PKGBUILD not found'
fi
if [ "$(basename $(readlink -f .))" != 'trunk' ]; then
abort 'archrelease: Not in a package trunk dir'
fi
if [ ! -z "$(svn status -q)" ]; then
abort 'archrelease: You have not committed your changes yet!'
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}" || abort
fi
svn copy -q -r HEAD trunk "repos/${1}"
svn commit -q -m "archrelease: copy trunk to ${1}" || abort
popd >/dev/null
echo 'done'
|