#!/bin/bash
echo Uncompressing archive...
export TMPDIR=`mktemp -d /tmp/kXXXXXX`
ARCHIVE=`awk '/^__ARCHIVE_BELOW__/ {print NR + 1; exit 0; }' $0`
tail -n+$ARCHIVE $0 | tar xz -C $TMPDIR

CDIR=`pwd`
cd $TMPDIR
./titanium_runtime
cd $CDIR
rm -rf $TMPDIR

exit 0
__ARCHIVE_BELOW__

#!/bin/bash
echo Uncompressing archive...
export TMPDIR=`mktemp -d /tmp/kXXXXXX`
ARCHIVE=`awk '/^__ARCHIVE_BELOW__/ {print NR + 1; exit 0; }' $0`
tail -n+$ARCHIVE $0 | tar xz -C $TMPDIR

$TMPDIR/titanium_runtime
rm -rf $TMPDIR

exit 0
__ARCHIVE_BELOW__

Fix issue with current working directory in Linux / developer tool
Fix issue with current working directory in Linux / developer tool
