Browse Source

Add start of patching

nsITobin 1 month ago
parent
commit
76634fdafa
3 changed files with 68 additions and 0 deletions
  1. 68 0
      mach
  2. 0 0
      queue-central/comm/patches/exists
  3. 0 0
      queue-central/mozilla/patches/exists

+ 68 - 0
mach

@@ -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
+
+# =====================================================================================================================

+ 0 - 0
queue-central/comm/patches/exists


+ 0 - 0
queue-central/mozilla/patches/exists