diff options
Diffstat (limited to 'tools/entrypoint.sh')
-rwxr-xr-x | tools/entrypoint.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tools/entrypoint.sh b/tools/entrypoint.sh new file mode 100755 index 0000000..74a629b --- /dev/null +++ b/tools/entrypoint.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +function checkbin() { + type -P su-exec +} + +function su_mt_user() { + su android -c '"$0" "$@"' -- "$@" +} + +chown android:android /opt/android-sdk-linux + +if checkbin; then + exec su-exec android:android /opt/tools/android-sdk-update.sh "$@" +else + su_mt_user /opt/tools/android-sdk-update.sh ${1} +fi + + + + + + + |