]> arthur.barton.de Git - bup.git/blobdiff - cmd/on--server-cmd.py
Configure python, use it, and embed during install
[bup.git] / cmd / on--server-cmd.py
index 327c81ffd8edc32cc945f7959de6b4cf45a04039..cdfd44113c352e3560a521e97d7e915344b7ee07 100755 (executable)
@@ -1,4 +1,9 @@
-#!/usr/bin/env python
+#!/bin/sh
+"""": # -*-python-*-
+bup_python="$(dirname "$0")/bup-python" || exit $?
+exec "$bup_python" "$0" ${1+"$@"}
+"""
+# end of bup preamble
 import sys, os, struct
 from bup import options, helpers
 
@@ -23,6 +28,7 @@ assert(sz < 1000000)
 buf = sys.stdin.read(sz)
 assert(len(buf) == sz)
 argv = buf.split('\0')
+argv = [argv[0], 'mux', '--'] + argv
 
 # stdin/stdout are supposedly connected to 'bup server' that the caller
 # started for us (often on the other end of an ssh tunnel), so we don't want