about summary refs log tree commit diff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/etc/adb_run_wrapper.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/etc/adb_run_wrapper.sh b/src/etc/adb_run_wrapper.sh
new file mode 100755
index 00000000000..7d5fdb1cdd1
--- /dev/null
+++ b/src/etc/adb_run_wrapper.sh
@@ -0,0 +1,17 @@
+
+PATH=$(echo $0 | sed 's#/[^/]*$##')
+RUN=$1
+
+if [ ! -z "$RUN" ]
+then
+    shift
+    while [ -f $PATH/lock ]
+    do
+        sleep 1
+    done
+    touch $PATH/lock
+	LD_LIBRARY_PATH=$PATH $PATH/$RUN $@ 1>$PATH/$RUN.stdout 2>$PATH/$RUN.stderr
+	echo $? > $PATH/$RUN.exitcode
+    /system/bin/rm $PATH/lock
+fi
+