[debian-edu-commits] debian-edu/ 01/09: * Fixed debian-edu-etc-svk initialization using expect.

Alexander Alemayhu alexander at bitraf.no
Thu Aug 7 07:19:52 UTC 2014


This is an automated email from the git hooks/post-receive script.

ccscanf-guest pushed a commit to annotated tag 0.412.0.edu.etch.1+svn35006
in repository debian-edu-config.

commit 05dce89789c6b7faf0af1b7438955e50399801d5
Author: Petter Reinholdtsen <pere at hungry.com>
Date:   Sat Jun 23 16:03:21 2007 +0000

      * Fixed debian-edu-etc-svk initialization using expect.
---
 debian/changelog        |  1 +
 sbin/debian-edu-etc-svk | 13 ++++++++-----
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 279ca60..158ddae 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,6 +11,7 @@ debian-edu-config (0.412.0.edu.etch.1+svn34952) unstable; urgency=low
   [ Petter Reinholdtsen ]
   * Update ltsp testsuite to use i386 on amd64 systems to fix
     skolelinux bug #1200.
+  * Fixed debian-edu-etc-svk initialization using expect.
 
  -- Petter Reinholdtsen <pere at debian.org>  Fri, 22 Jun 2007 18:00:59 +0100
 
diff --git a/sbin/debian-edu-etc-svk b/sbin/debian-edu-etc-svk
index 260f3b0..ca7a4c9 100755
--- a/sbin/debian-edu-etc-svk
+++ b/sbin/debian-edu-etc-svk
@@ -17,10 +17,10 @@ do_init() {
     # Install svk
     aptitude install svk
    
-    # Initialize a depot in /root/.svk.  This is interactive.  Need to find a way to avoid question.
-    # use expect?
-#    svk depotmap --init
-    expect -d -c 'spawn svk depotmap --init; send "y\r"'
+
+    # Initialize a depot in ~/.svk by running "svk depotmap --init".
+    # This is interactive, so use expect to answer the question
+    expect -c 'spawn svk depotmap --init; expect -exact "create? (y/n)"; send "y\r"; expect eof'
 
     # Import $subdir making it a working copy
     svk import -m "Initial import." --to-checkout /$subdir $subdir
@@ -63,7 +63,10 @@ case "$1" in
 	do_update
 	;;
     *)
-	echo "error: incorrect command '$1'."
+	echo "error: incorrect or missing argument '$1'."
+	cat <<EOF
+Usage: $0 <init|update>
+EOF
 	exit 1
 	;;
 esac

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/debian-edu-config.git



More information about the debian-edu-commits mailing list