[packages/rpm-build-tools] - git support, works if called from packages directory

hawk hawk at pld-linux.org
Tue Jul 24 10:42:34 CEST 2012


commit 2d0ad334d7867f89b705eb33ff4ead5c619b4c4a
Author: Marcin Krol <hawk at tld-linux.org>
Date:   Tue Jul 24 08:44:58 2012 +0000

    - git support, works if called from packages directory

 relup.sh | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/relup.sh b/relup.sh
index 7963e2a..6426218 100755
--- a/relup.sh
+++ b/relup.sh
@@ -23,7 +23,7 @@ Options:
 -i
   Try to increment package release
 -u
-  cvs update first
+  git pull first
 -t | -n
   Test mode (dry-run). do not commit
 -m
@@ -123,13 +123,17 @@ n="$(echo -e '\nn')"
 n="${n%%n}"
 for file in $(ls "$tmpd" 2>/dev/null); do
 	files=$(cat "$tmpd/$file")
+	pkg=$(cat "$tmpd/$file" |sed -e 's|/.*||')
+	spec=$(cat "$tmpd/$file" |sed -e 's|.*/||')
 	rel=$(basename "$file")
 	msg=""
 	[ -n "$message" ] && msg="$msg- $message$n"
 	msg="$msg- release ${rel%%%*} (by relup.sh)$n"
-	echo cvs ci -m "'$msg'"
 	if [ "$test" != 1 ]; then
-		cvs ci -m "$msg" $files
+		cd $pkg
+		git commit -m "$msg" $spec
+		git push
+		cd ..
 	fi
 done
 rm -rf $tmpd


More information about the pld-cvs-commit mailing list