Created
April 25, 2018 00:47
-
-
Save dayllanmaza/9cf077ec7c70ce6e2d7042ea241d7ebc to your computer and use it in GitHub Desktop.
mw bash utils
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function mw() { | |
case $1 in | |
fix|test) | |
mw_composer $1 | |
;; | |
push) | |
mw_push | |
;; | |
*) | |
echo "mw $1 is not defined" | |
;; | |
esac | |
} | |
function mw_composer() { | |
git status --porcelain | sed s/^..// | xargs -L1 composer $1 | |
} | |
function mw_push() { | |
git remote update; git review | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment