All pastes #1897310 Raw Edit

Something

public text v1 · immutable
#1897310 ·published 2010-07-09 15:46 UTC
rendered paste body
Index: scripts.pro
===================================================================
--- scripts.pro	(revision 25298)
+++ scripts.pro	(working copy)
@@ -5,7 +5,7 @@
 TEMPLATE = app
 CONFIG -= moc qt
 
-QMAKE_COPY_DIR = sh ./cpsvndir
+QMAKE_COPY_DIR = MYTHPYTHON=$${PYTHON} sh ./cpsvndir
 win32:QMAKE_COPY_DIR = sh ./cpsimple
 
 installscripts.path = $${PREFIX}/share/mythtv
Index: cpsvndir
===================================================================
--- cpsvndir	(revision 25298)
+++ cpsvndir	(working copy)
@@ -38,6 +38,11 @@
 IFS='
 '
 
+MYTHPYTHONBASE=
+if [ ! -z "$MYTHPYTHON" ]; then
+    MYTHPYTHONBASE=$(basename $MYTHPYTHON)
+fi
+
 # Copy all files and directories except .svn
 cd "$SRC"
 for file in $(find . -name .svn -prune -or -print); do
@@ -46,7 +51,10 @@
 	mkdir -p "$DEST/$file"
     else
 	cp -pR "$file" "$DEST/$file"
-        chown -h $EUID:$EGID "$DEST/$file"
+	if [ ! -z "$MYTHPYTHONBASE" ]; then
+	    sed -i -e"s%#!/usr/bin/env python%#!/usr/bin/env ${MYTHPYTHONBASE}%" "$DEST/$file"
+	fi
+	chown -h $EUID:$EGID "$DEST/$file"
 	chmod +r "$DEST/$file" &> /dev/null
     fi
 done