r12240 - /scripts/qa/packagecheck
dmn at users.alioth.debian.org
dmn at users.alioth.debian.org
Tue Jan 8 20:41:33 UTC 2008
Author: dmn
Date: Tue Jan 8 20:41:33 2008
New Revision: 12240
URL: http://svn.debian.org/wsvn/?sc=1&rev=12240
Log:
Make also the diff/commit code work in the single package case (-p). As a side evvect, streamline the code
Modified:
scripts/qa/packagecheck
Modified: scripts/qa/packagecheck
URL: http://svn.debian.org/wsvn/scripts/qa/packagecheck?rev=12240&op=diff
==============================================================================
--- scripts/qa/packagecheck (original)
+++ scripts/qa/packagecheck Tue Jan 8 20:41:33 2008
@@ -236,31 +236,25 @@
TRUNK=${1:-trunk}
if [ -n "$PKG" ]; then
- # package given. work only with it, not all trunk
- echo "Running svn up $TRUNK/$PKG ..."
- svn up $TRUNK/$PKG
-
- echo "Checking if $TRUNK/$PKG is clean ..."
- UNCLEAN=$(svn st $TRUNK/$PKG |egrep -v '^\?')
- if [ -n "$UNCLEAN" ]; then
- echo "$UNCLEAN"
- echo WARNING: $TRUNK/$PKG is not clean
- fi
-
+ WORK_DIR=$TRUNK/$PKG
+else
+ WORK_DIR=$TRUNK
+fi
+
+# package given. work only with it, not all trunk
+echo "Running svn up $WORK_DIR ..."
+svn up $WORK_DIR
+
+echo "Checking if $WORK_DIR is clean ..."
+UNCLEAN=$(svn st $WORK_DIR |egrep -v '^\?')
+if [ -n "$UNCLEAN" ]; then
+ echo "$UNCLEAN"
+ echo WARNING: $WORK_DIR is not clean
+fi
+
+if [ -n "$PKG" ]; then
check_package $PKG
-
else
-
- echo "Running svn up $TRUNK ..."
- svn up $TRUNK
-
- echo "Checking if $TRUNK is clean ..."
- UNCLEAN=$(svn st $TRUNK |egrep -v '^\?')
- if [ -n "$UNCLEAN" ]; then
- echo "$UNCLEAN"
- echo WARNING: $TRUNK is not clean
- fi
-
# loop over packages
echo "Grepping through packages ..."
@@ -270,29 +264,28 @@
check_package $PKG
done
-
fi
# work is done. svn diff? svn commit?
if [ "$CHANGED" = "1" ]; then
- read -p "Show svn diff $TRUNK (y|N)? " DIFF
+ read -p "Show svn diff $WORK_DIR (y|N)? " DIFF
case $DIFF in
y|Y)
- svn diff $TRUNK | less
+ svn diff $WORK_DIR | less
;;
*)
;;
esac
if [ -n "$UNCLEAN" ]; then
- echo $TRUNK was not clean at start. Please commit manually.
+ echo $WORK_DIR was not clean at start. Please commit manually.
else
- read -p "Commit $TRUNK (y|N)? " COMMIT
+ read -p "Commit $WORK_DIR (y|N)? " COMMIT
case $COMMIT in
y|Y)
- svn ci -m "[packagecheck] fixed Vcs-(Svn|Browser)/Homepage field(s) in debian/control and/or URL in debian/watch and/or rmdir /usr/{lib|share}/perl5 in debian/rules." $TRUNK
+ svn ci -m "[packagecheck] fixed Vcs-(Svn|Browser)/Homepage field(s) in debian/control and/or URL in debian/watch and/or rmdir /usr/{lib|share}/perl5 in debian/rules." $WORK_DIR
;;
*)
;;
@@ -305,4 +298,4 @@
exit 0
-# vi: set noet sts=0:
+# vi: set noet sts=0 sw=8:
More information about the Pkg-perl-cvs-commits
mailing list