generated from exteraGramPlugins/pluginBase
Initial commit
This commit is contained in:
commit
787965ebbf
37 files changed
+2613
No files matched your search
@@ -0,0 +1,26 @@
|
||||
# Shared helpers for scripts/*.sh. Source, do not execute:
|
||||
# source "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
|
||||
|
||||
REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
PKG=com.exteragram.messenger
|
||||
DEV_PORT=42690
|
||||
DEBUG_PORT=5678
|
||||
PY="${PYTHON:-python3}"
|
||||
ADB="${ADB:-adb}"
|
||||
|
||||
PLUGIN_ID="$("$PY" -c "import json,sys; print(json.load(open(sys.argv[1]))['id'])" "$REPO_ROOT/plugin.json")"
|
||||
|
||||
die() {
|
||||
echo "error: $*" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
need_cmd() {
|
||||
for cmd in "$@"; do
|
||||
command -v "$cmd" >/dev/null 2>&1 || die "required command not found on PATH: $cmd"
|
||||
done
|
||||
}
|
||||
|
||||
app_pid() {
|
||||
"$ADB" shell pidof -s "$PKG" | tr -d '\r'
|
||||
}
|
||||
Reference in new issue
Block a user