#!/bin/sh#_(exec"$(dirname "$0")/bb""$0""$@");; The APK, built as a graph.
;;
;; apk.bb [build|install|run|log]
;;
;; The build itself is android/BUCK; this only asks buck for the file and then
;; does what was asked with it. android/build-apk.bb is the same APK built step
;; by step instead, for when the graph is what is being doubted.
(require'[babashka.classpath:ascp])(cp/add-classpath(str(babashka.fs/parent*file*)))(require'[frq.paths:aspaths]'[babashka.fs:asfs]'[babashka.process:asp]'[clojure.string:asstr])(defroot(str(fs/canonicalize(fs/path(fs/parent*file*)".."))))(defaction(or(first*command-line-args*)"build"))(defadb(paths/env"ADB"(str(fs/path(fs/home)".local""share""android-sdk""platform-tools""adb"))))(defpackage"uk.nandi.frq")(defnapk[](->>(paths/out(str(fs/pathroot"scripts""buck.bb"))"build""--show-output""//:apk")str/split-lines(some#(when(str/includes?%"frq.apk")(second(str/split%#"\s+"))))(strroot"/")))(caseaction"build"(println(apk))"install"(p/shelladb"install""-r"(apk))"run"(let[file(apk)](p/shelladb"install""-r"file)(p/shelladb"shell""am""force-stop"package)(p/shelladb"shell""am""start""-n"(strpackage"/.FrqActivity")))"log"(p/shelladb"logcat""-s""VidyaJolt""Vidya")(paths/die"usage: apk.bb [build|install|run|log]"))
One first-party cookie so a repeat visit isn't counted twice. No cross-site tracking, nothing stored until you accept. Cookie Policy.