summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xpexpect/tools/websync12
-rwxr-xr-xpexpect/tools/websync.py43
2 files changed, 43 insertions, 12 deletions
diff --git a/pexpect/tools/websync b/pexpect/tools/websync
deleted file mode 100755
index 7f3a76d..0000000
--- a/pexpect/tools/websync
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-ROOT=..
-# I use this to keep the sourceforge pages up to date with the
-# latest documentation and I like to keep a copy of the distribution
-# on the web site so that it will be compatible with
-# The Vaults of Parnasus which requires a direct URL link to a
-# tar ball distribution. I don't advertise the package this way.
-ssh noah@use-pr-shell1.sourceforge.net "cd htdocs;rm index.html;wget http://www.noah.org/python/pexpect/index.html"
-ssh noah@use-pr-shell1.sourceforge.net "cd htdocs;rm clean.css;wget http://www.noah.org/python/pexpect/clean.css"
-scp $ROOT/pexpect-doc.tgz noah@use-pr-shell1.sourceforge.net:htdocs/pexpect-doc.tgz
-ssh noah@use-pr-shell1.sourceforge.net "cd htdocs;tar zxvf pexpect-doc.tgz"
-scp $ROOT/pexpect-current.tgz noah@use-pr-shell1.sourceforge.net:htdocs/pexpect-current.tgz
diff --git a/pexpect/tools/websync.py b/pexpect/tools/websync.py
new file mode 100755
index 0000000..5c913ee
--- /dev/null
+++ b/pexpect/tools/websync.py
@@ -0,0 +1,43 @@
+#!/usr/bin/env python
+
+# I use this to keep the sourceforge pages up to date with the
+# latest documentation and I like to keep a copy of the distribution
+# on the web site so that it will be compatible with
+# The Vaults of Parnasus which requires a direct URL link to a
+# tar ball distribution. I don't advertise the package this way.
+
+import pexpect
+import getpass
+
+X = getpass.getpass('Password: ')
+
+p = pexpect.spawn ('ssh noah@use-pr-shell1.sourceforge.net "cd htdocs;rm index.html;wget http://www.noah.org/python/pexpect/index.html"')
+p.expect ('password:')
+p.sendline (X)
+p.expect (pexpect.EOF)
+print p.before
+
+p = pexpect.spawn ('ssh noah@use-pr-shell1.sourceforge.net "cd htdocs;rm clean.css;wget http://www.noah.org/python/pexpect/clean.css"')
+p.expect ('password:')
+p.sendline (X)
+p.expect (pexpect.EOF)
+print p.before
+
+p = pexpect.spawn ('scp pexpect-doc.tgz noah@use-pr-shell1.sourceforge.net:htdocs/pexpect-doc.tgz')
+p.expect ('password:')
+p.sendline (X)
+p.expect (pexpect.EOF)
+print p.before
+
+p = pexpect.spawn ('ssh noah@use-pr-shell1.sourceforge.net "cd htdocs;tar zxvf pexpect-doc.tgz"')
+p.expect ('password:')
+p.sendline (X)
+p.expect (pexpect.EOF)
+print p.before
+
+p = pexpect.spawn ('scp pexpect-current.tgz noah@use-pr-shell1.sourceforge.net:htdocs/pexpect-current.tgz')
+p.expect ('password:')
+p.sendline (X)
+p.expect (pexpect.EOF)
+print p.before
+