2021-12-21 02:44:51 +00:00
|
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
|
|
⚡️hello() {
|
|
|
|
|
_help-line "Say hello!" "$@"
|
|
|
|
|
echo Hello, world!
|
|
|
|
|
}
|
|
|
|
|
|
2021-12-21 04:51:18 +00:00
|
|
|
|
⚡️build() {
|
|
|
|
|
_help-line "Build an incredible script" "$@"
|
|
|
|
|
echo "echo hi" > .generated/potato
|
|
|
|
|
chmod +x .generated/potato
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
⚡️run() {
|
|
|
|
|
_help-line "Run the script" "$@"
|
|
|
|
|
⚡️build
|
|
|
|
|
.generated/potato "$@"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
⚡️check() {
|
|
|
|
|
_help-line "Verify the script passes shellcheck" "$@"
|
|
|
|
|
⚡️build
|
|
|
|
|
shellcheck .generated/potato
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
⚡️test() {
|
|
|
|
|
_help-line "Test output of the script" "$@"
|
|
|
|
|
⚡️build
|
|
|
|
|
[ "$(.generated/potato)" == "hi" ]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
⚡️clean() {
|
|
|
|
|
_help-line "Delete generated GARBAGE" "$@"
|
|
|
|
|
rm -rf .generated
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
⚡️good() {
|
|
|
|
|
_help-line "Show a nice message for something nice happening" "$@"
|
|
|
|
|
_good-message + Good Message
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
⚡️bad() {
|
|
|
|
|
_help-line "Show a bad message for something bad happening" "$@"
|
|
|
|
|
_bad-message - Bad Message
|
|
|
|
|
}
|
|
|
|
|
|
2021-12-21 02:44:51 +00:00
|
|
|
|
source ⚡️
|