[tasque/transition: 48/213] Clean up and bin script fixture



commit 74b1baff0d2263f1878b946a01d4712ec36423b6
Author: Antonius Riha <antoniusriha gmail com>
Date:   Wed May 30 00:51:31 2012 +0200

    Clean up and bin script fixture
    
    * the fix script now adds the parameter -a "Tasque" to the exec command in the bin script. This helps in registering the Tasque process with a proper name (since the mono runtime is the primary argument to exec). Since /bin/sh exec doesn't provide the -a parameter the bin script is now interpreted by bash.
    
    * clean up old scipt fragments

 build/fixautotoolsbuild.sh |   17 +++++++----------
 src/tasque/tasque.in       |    4 ++--
 2 files changed, 9 insertions(+), 12 deletions(-)
---
diff --git a/build/fixautotoolsbuild.sh b/build/fixautotoolsbuild.sh
index 7e7c984..0d37621 100755
--- a/build/fixautotoolsbuild.sh
+++ b/build/fixautotoolsbuild.sh
@@ -1,19 +1,16 @@
 # work around "main assembly missing" bug
-
 inclfile="Makefile.include"
-
 cp "$inclfile" "${inclfile}.in"
-
 cat "${inclfile}.in" | \
 sed -e 's/programfiles_DATA = $(ASSEMBLY)//' | \
 sed -e 's/programfiles_DATA = $(PROGRAMFILES)/programfiles_DATA = $(ASSEMBLY) $(PROGRAMFILES)/' > "$inclfile"
-
 rm "${inclfile}.in"
-#VERSION=$(cat CommonAssemblyInfo.cs | grep "assembly: AssemblyVersion" | perl -pe "s/.*\"(.*)\".*/\1/")
-
-#echo $VERSION
 
-#tmp=$(tempfile)
-#cat ../configure.ac | perl -pe "s/(AC_INIT\(\[tasque\], \[).+(\]\))/\${1}$VERSION\$2/" > tmp
 
-#mv tmp ../configure.ac
+# fix bin script: add "-a Tasque" so that proper process name is used
+binfile="src/tasque/tasque.in"
+cp "$binfile" "${binfile}.in"
+cat "${binfile}.in" | \
+sed -e 's/#!\/bin\/sh/#!\/bin\/bash/' | \
+sed -e 's/exec mono "@expanded_libdir \/@PACKAGE \/tasque.exe" "$@"/exec -a "Tasque" mono "@expanded_libdir \/@PACKAGE \/tasque.exe" "$@"/' > "$binfile"
+rm "${binfile}.in"
diff --git a/src/tasque/tasque.in b/src/tasque/tasque.in
index 4889519..a0889ec 100644
--- a/src/tasque/tasque.in
+++ b/src/tasque/tasque.in
@@ -1,3 +1,3 @@
-#!/bin/sh
+#!/bin/bash
 
-exec mono "@expanded_libdir@/@PACKAGE@/tasque.exe" "$@"
+exec -a "Tasque" mono "@expanded_libdir@/@PACKAGE@/tasque.exe" "$@"



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]