Skip to content

Instantly share code, notes, and snippets.

@GochoMugo

GochoMugo/goodies.sh

Last active Mar 5, 2016
Embed
What would you like to do?
$ msu install-many mods.txt # assuming the file 'mods.txt' list some modules
$ msu upgrade # this upgrades 'msu' to latest release
$ msu nuke # this removes msu from this machine
$ msu install gh:GochoMugo/proverbs # installs from github
$ msu.reload # reloads aliases
$ proverb # we have a new command: proverb
gh:GochoMugo/fancy-aliases
gh:GochoMugo/submarine
gh:GochoMugo/transfer
$ chmod +x sample.sh # make it executable
$ ./sample.sh # run the script
success: this is a sample success msg
error: this is a sample error msg
#!/usr/bin/env msu
# modules
msu_require "console"
# prints a sample success message
sample_success_msg() {
# 'success' function has been imported from module 'console'
success "this is a sample success msg"
}
# prints a sample error message
sample_error_msg() {
# 'error' function has been imported from module 'console'
error "this is a sample error msg"
}
# now we start our primary tasks
sample_success_msg # print a sample success message
sample_error_msg # print a sample error message
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.