diff options
author | Matt A. Tobin <email@mattatobin.com> | 2022-04-01 03:45:03 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2022-04-01 03:45:03 -0500 |
commit | 987f15dc417be4ac452ebc8f582e819439dd99bb (patch) | |
tree | b725a2501a8b78a1feb15d4dae9cab0e3f99216e /mach | |
parent | 141d49f336edafc79e1a1f1ff81d2ce48065dfa9 (diff) | |
download | aura-central-987f15dc417be4ac452ebc8f582e819439dd99bb.tar.gz |
Add the webpatch command to bash-mach
Diffstat (limited to 'mach')
-rwxr-xr-x | mach | 20 |
1 files changed, 17 insertions, 3 deletions
@@ -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 |