Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
Get simgrid installation path from binary.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Fri, 7 Jan 2011 08:14:25 +0000 (09:14 +0100)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Fri, 7 Jan 2011 08:14:25 +0000 (09:14 +0100)
colorized-loba

index 6abc53cdd018e14d34c796bf75a345c66a208d51..1f20b0739ebb0a6deef56648b9761e7f0a22ff93 100755 (executable)
@@ -1,3 +1,8 @@
 #!/bin/sh
 
-exec ./loba "$@" -v 2>&1 | ./simgrid-stable/bin/simgrid-colorizer - | less -R
+loba=./loba
+path=$(ldd "$loba" | sed '/libsimgrid/!d;s/.*=> \(.*\)\/lib\/libsimgrid.*/\1/')
+: ${path:="./simgrid-stable"}
+colorizer="$path/bin/simgrid-colorizer"
+
+exec "$loba" "$@" -v 2>&1 | "$colorizer" - | less -R