summaryrefslogtreecommitdiffstats
path: root/archrelease
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2010-02-17 18:05:16 +0100
committerPierre Schmitz <pierre@archlinux.de>2010-02-17 18:05:16 +0100
commit53a864a5aa2e273154e4e37218b967924cf4cf79 (patch)
tree8353f043df3bd582c685671e81f5ca3038dcad10 /archrelease
parent849e6c6de51415888146f2def34b5264bccffb7a (diff)
downloaddevtools-53a864a5aa2e273154e4e37218b967924cf4cf79.tar.gz
devtools-53a864a5aa2e273154e4e37218b967924cf4cf79.tar.xz
Use local information to determine if a commit is needed
Diffstat (limited to 'archrelease')
-rwxr-xr-xarchrelease20
1 files changed, 11 insertions, 9 deletions
diff --git a/archrelease b/archrelease
index 70845a6..c9f32cb 100755
--- a/archrelease
+++ b/archrelease
@@ -15,7 +15,7 @@ if [ "$(basename $(readlink -f .))" != 'trunk' ]; then
exit 1
fi
-if [ "$(svn diff)" != '' ]; then
+if [ ! -z "$(svn status -q)" ]; then
echo 'archrelease: You have not committed your changes yet!'
echo ' Please run "svn commit" first'
exit 1
@@ -23,18 +23,20 @@ fi
echo -n 'releasing package...'
pushd .. >/dev/null
-url=$(svn info | grep URL)
-url="${url##*URL: }"
-if [ -z "$(svn diff ${url}/trunk ${url}/repos/${1} 2>/dev/null)" -a $? -eq 0 ]; then
+
+trunk=$(LANG=C svn info trunk | grep 'Last Changed Rev:' | awk '{ print $4 }')
+repo=$(LANG=C svn info "repos/${1}" 2>/dev/null | grep 'Last Changed Rev:' | awk '{ print $4 }')
+if [[ ${trunk} -le ${repo} ]]; then
echo 'already done'
exit 1
fi
-if [ -d repos/$1 ]; then
- svn rm --force -q repos/$1
- svn commit -q -m "archrelease: remove $1"
+
+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"
+svn copy -q -r HEAD trunk "repos/${1}"
+svn commit -q -m "archrelease: copy trunk to ${1}"
popd >/dev/null
echo 'done'