Newer
Older
#!/bin/bash
if [ "$1" = '' ]; then
echo 'Usage: archrelease <repo>'
exit 1
if [ ! -f PKGBUILD ]; then
echo 'archrelease: PKGBUILD not found'
exit 1
if [ "$(basename $(readlink -f .))" != 'trunk' ]; then
echo 'archrelease: Not in a package trunk dir'
exit 1
if [ "$(svn diff)" != '' ]; then
echo 'archrelease: You have not committed your changes yet!'
echo ' Please run "svn commit" first'
exit 1
echo -n 'releasing package...'
url=$(svn info | grep URL)
url="${url##*URL: }"
if [ -z "$(svn diff ${url}/trunk ${url}/repos/${1} 2>/dev/null)" -a $? -eq 0 ]; then
echo 'already done'
exit 1
fi
svn rm --force -q repos/$1
svn commit -q -m "archrelease: remove $1"
svn copy -q -r HEAD trunk repos/$1
svn commit -q -m "archrelease: copy trunk to $1"
# vim: set noexpandtab tabstop=8 shiftwidth=8 wrap:textwidth=132 autoindent
# kate: indent-mode normal; indent-width 8; tab-indents on; tab-width 8; word-wrap on; word-wrap-column 132