Skip to content

Instantly share code, notes, and snippets.

@GochoMugo
Last active March 5, 2016 10:08
Show Gist options
  • Save GochoMugo/e4b9c6af3a72ec46ff2b to your computer and use it in GitHub Desktop.
Save GochoMugo/e4b9c6af3a72ec46ff2b to your computer and use it in GitHub Desktop.
$ 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