etc: adb_run_wrapper added

This commit is contained in:
Young-il Choi 2013-05-29 16:04:11 +09:00
parent 5076bca1ba
commit 0ea8274fca

17
src/etc/adb_run_wrapper.sh Executable file
View file

@ -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