From 8c7dfe6831c8bf03f839bc44b6fd26602d987e06 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Mon, 30 May 2022 16:08:32 -0500 Subject: [Mach:Bash] Add localbuild and superclobber --- mach | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/mach b/mach index 5118d794d..7b076b00a 100755 --- a/mach +++ b/mach @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash BINOC_MACH=real-mach BINOC_TARGET_OS=`uname | tr [:upper:] [:lower:]` @@ -38,6 +38,21 @@ if [[ "$1" == "build-release" ]]; then if [[ "$BINOC_TARGET_OS" == "windows" ]]; then $BINOC_MACH installer fi +elif [ "$1" == "localbuild" ]; then + # This builds and stages the application in dist/MOZ_APP_NAME but does not + # actually generate an archive or any of the other stuff + $BINOC_MACH build + if [[ "$BINOC_TARGET_OS" == "windows" ]]; then + $BINOC_MACH installer && $BINOC_MACH install + else + $BINOC_MACH stage + fi +elif [[ "$1" == "superclobber" && -d "../.obj" ]]; then + printf "Removing all object directories in ../.obj" + rm -rf ../.obj/* +elif [ "$1" == "version" ]; then + # This will execute version2k.py and pass any remaining args to it + $BINOC_PYTHON ./build/version2k.py ${@:2} elif [[ "$1" == "webpatch" ]] && [[ -n "$BINOC_GIT" ]] && [[ -n "$BINOC_CURL" ]]; then if [ -z "$2" ]; then printf "Patch with what?" -- cgit v1.2.3