Skip to content

Instantly share code, notes, and snippets.

@steveosoule
Created June 26, 2023 16:20
Show Gist options
  • Save steveosoule/14611ed7702d2da1f6fb42df754f22c4 to your computer and use it in GitHub Desktop.
Save steveosoule/14611ed7702d2da1f6fb42df754f22c4 to your computer and use it in GitHub Desktop.
Helpful Bash Aliases and Functions for MMT
alias mmt-push-commit='mmt push --notes="mmt-push-commit: `git log --pretty=oneline -n 1`"'
alias mpc='mmt-push-commit'
alias mmt-tag-git-branch='mmt tag add $(git rev-parse --abbrev-ref HEAD)'
alias mmt-tag-git-commit='mmt tag add $(git rev-parse --short HEAD)'
function mmt-push() {
mmt tag delete --all
mmt-tag-git-branch
mmt-tag-git-commit
mmt tag add mpc
mmt push --notes="${1}
## MMT Status:
`mmt status`
## Git Branch:
`git rev-parse --abbrev-ref HEAD`
## Git Status:
`git status --porcelain`
## Git Log:
`git log --pretty=oneline -n 1`"
mmt tag delete --all
}
function cmmt() {
readonly msg=${1:?"The commit message must be specified."}
git add .
git commit -a -m "$msg"
mmt-push-commit
}
function pkg() {
readonly code=${1:?"The pkg code must be specified."}
tar -cvjSf ../"$code".pkg *
}
function flex() {
readonly code=${1:?"The flex code must be specified."}
tar -cvjSf ../"$code".tar.bz2 *
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment