summaryrefslogtreecommitdiff
path: root/mach
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2022-04-01 03:45:03 -0500
committerMatt A. Tobin <email@mattatobin.com>2022-04-01 03:45:03 -0500
commit987f15dc417be4ac452ebc8f582e819439dd99bb (patch)
treeb725a2501a8b78a1feb15d4dae9cab0e3f99216e /mach
parent141d49f336edafc79e1a1f1ff81d2ce48065dfa9 (diff)
downloadaura-central-987f15dc417be4ac452ebc8f582e819439dd99bb.tar.gz
Add the webpatch command to bash-mach
Diffstat (limited to 'mach')
-rwxr-xr-xmach20
1 files changed, 17 insertions, 3 deletions
diff --git a/mach b/mach
index 0f7505a15..f940aea67 100755
--- a/mach
+++ b/mach
@@ -33,8 +33,22 @@ export BINOC_CONFIG_GUESS=$BINOC_CONFIG_GUESS
# =====================================================================================================================
-# We don't know what the command is but real-mach might so just pass
-# all the args to it
-$BINOC_MACH $@
+if [ "$1" == "webpatch" ] && [ -n "$BINOC_GIT" ] && [ -n "$BINOC_CURL" ]; then
+ if [ -z "$2" ]; then
+ printf "Patch with what?"
+ exit 1
+ else
+ if [[ "$2" == *"github.com"* ]] || [[ "$2" == *"repo.palemoon.org"* ]]; then
+ echo ${2}.patch
+ $BINOC_CURL -L ${2}.patch | "$BINOC_GIT" apply --reject
+ else
+ $BINOC_CURL -L ${2} | "$BINOC_GIT" apply --reject
+ fi
+ fi
+else
+ # We don't know what the command is but real-mach might so just pass
+ # all the args to it
+ $BINOC_MACH $@
+fi
# ===================================================================================================================== \ No newline at end of file