|
@@ -0,0 +1,68 @@
|
|
|
+#/bin/bash
|
|
|
+
|
|
|
+# == | Setup | ========================================================================================================
|
|
|
+
|
|
|
+set -x #echo on
|
|
|
+
|
|
|
+# ---------------------------------------------------------------------------------------------------------------------
|
|
|
+
|
|
|
+if [[ -z "$1" ]]; then
|
|
|
+ printf "${0} usage: bootstrap | build | run\n"
|
|
|
+ exit 1
|
|
|
+fi
|
|
|
+
|
|
|
+# =====================================================================================================================
|
|
|
+
|
|
|
+# == | Functions | ====================================================================================================
|
|
|
+
|
|
|
+shmach_cmd_bootstrap() {
|
|
|
+ printf "${0} error: needs rewritten\n"
|
|
|
+ exit 1
|
|
|
+
|
|
|
+ mkdir -pv "./.obj/cache"
|
|
|
+ cd "./.obj/cache"
|
|
|
+
|
|
|
+ # --------------------------------- #
|
|
|
+
|
|
|
+ M3_HGBUNDLE_BASEURL="https://files.thereisonlyxul.org/"
|
|
|
+ M3_MOZILLA_RELEASE=""
|
|
|
+ M3_COMM_RELEASE=""
|
|
|
+
|
|
|
+ if [[ ! -f "./${M3_MOZILLA_RELEASE}" ]]; then
|
|
|
+ wget $M3_HGBUNDLE_BASEURL/$M3_MOZILLA_RELEASE
|
|
|
+ wget $M3_HGBUNDLE_BASEURL/$M3_COMM_RELEASE
|
|
|
+ fi
|
|
|
+
|
|
|
+ # --------------------------------- #
|
|
|
+
|
|
|
+ if [[ ! -d "./source" ]]; then
|
|
|
+ hg clone ./cache/$M3_MOZILLA_RELEASE source
|
|
|
+ hg clone ./cache/$M3_COMM_RELEASE source/comm
|
|
|
+ fi
|
|
|
+
|
|
|
+ # --------------------------------- #
|
|
|
+
|
|
|
+ printf "${0} information: Bootstrap complete.\n"
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+# ---------------------------------------------------------------------------------------------------------------------
|
|
|
+
|
|
|
+shmach_cmd_build() {
|
|
|
+ printf "${0} information: Build complete.\n"
|
|
|
+}
|
|
|
+
|
|
|
+# ---------------------------------------------------------------------------------------------------------------------
|
|
|
+
|
|
|
+shmach_cmd_run() {
|
|
|
+ printf "${0} information: Run complete.\n"
|
|
|
+}
|
|
|
+
|
|
|
+# =====================================================================================================================
|
|
|
+
|
|
|
+# == | Main | =========================================================================================================
|
|
|
+
|
|
|
+"shmach_cmd_${@:1}"
|
|
|
+exit 0
|
|
|
+
|
|
|
+# =====================================================================================================================
|