Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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'