summaryrefslogtreecommitdiff
path: root/extras
diff options
context:
space:
mode:
authorAaron Bockover <abockover@novell.com>2010-04-26 14:25:18 -0400
committerGabriel Burt <gabriel.burt@gmail.com>2010-05-05 12:53:54 -0700
commitfccd1d734f50e825dacdd5e6f45e7c4189ca69f1 (patch)
tree93a1b379d3e72be787af38b8ef7e42069e322bc2 /extras
parent1b1dc1c194b75df0c86f24944da8bfdc7fa34595 (diff)
Added push-meego script
Diffstat (limited to 'extras')
-rwxr-xr-xextras/push-meego32
1 files changed, 32 insertions, 0 deletions
diff --git a/extras/push-meego b/extras/push-meego
new file mode 100755
index 000000000..1068cc836
--- /dev/null
+++ b/extras/push-meego
@@ -0,0 +1,32 @@
+#!/usr/bin/env python
+
+import os
+import sys
+import subprocess
+
+prefix = '/usr/lib/banshee-1'
+exclude_files = []
+sync_files = {}
+
+for path in subprocess.Popen (['meego-ssh', 'find', prefix],
+ stdout = subprocess.PIPE).communicate ()[0].split ('\n'):
+
+ basename = os.path.basename (path)
+ bin_path = os.path.join ('bin', basename)
+
+ if not os.path.isfile (bin_path) or basename in exclude_files:
+ continue
+
+ relpath = os.path.relpath (path, prefix)
+ dirname = os.path.dirname (relpath)
+ if dirname not in sync_files:
+ sync_files[dirname] = []
+ sync_files[dirname].append (bin_path)
+
+for dirname, files in sync_files.iteritems ():
+ scp = ['meego-scp', '-u', 'root']
+ scp.extend (files)
+ scp.append (os.path.abspath (os.path.join (prefix, dirname)))
+ os.waitpid (subprocess.Popen (scp).pid, 0)
+
+subprocess.call (['meego-ssh', 'killall', '-9', 'mutter', 'banshee-1'])