mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-31 03:39:57 +02:00
Update tpt-libs, add support for android
This commit is contained in:
28
android/install-apk.py
Normal file
28
android/install-apk.py
Normal file
@@ -0,0 +1,28 @@
|
||||
import os
|
||||
import os.path
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
(
|
||||
script,
|
||||
adb,
|
||||
build_dir,
|
||||
phony,
|
||||
apk_name,
|
||||
) = sys.argv
|
||||
|
||||
apk_path = os.path.join(build_dir, apk_name)
|
||||
phony_path = os.path.join(build_dir, phony)
|
||||
|
||||
if os.path.exists(phony_path):
|
||||
os.remove(phony_path)
|
||||
|
||||
if subprocess.run([
|
||||
adb,
|
||||
'install',
|
||||
apk_path,
|
||||
]).returncode:
|
||||
sys.exit(1)
|
||||
|
||||
with open(phony_path, 'w') as _:
|
||||
pass
|
Reference in New Issue
Block a user