4 Commits
2.0.2 ... 2.0.4

Author SHA1 Message Date
Tyler Akins
dbefade193 Adding a version number
It is shown with --help. It's also available as $MO_VERSION when mo is
sourced.
2017-11-30 05:43:10 -06:00
Tyler Akins
57a8d41394 Merge pull request #21 from jas99/patch-1
Fix: Intall issue
2017-11-20 07:22:43 -06:00
Jaspreet Singh
5739ccd705 Fix: Intall issue
Added -L flag to curl; so as to allow following redirect.
2017-11-19 15:53:12 +05:30
Tyler Akins
f889c37316 Found another issue with strict mode 2017-11-13 13:53:38 -06:00
2 changed files with 5 additions and 2 deletions

View File

@@ -41,7 +41,7 @@ There are a few ways you can install this tool. How you install it depends on h
You can install this file in `/usr/local/bin/` or `/usr/bin/` by simply downloading it, changing the permissions, then moving it to the right location. Double check that your system's PATH includes the destination folder, otherwise users may have a hard time starting the command. You can install this file in `/usr/local/bin/` or `/usr/bin/` by simply downloading it, changing the permissions, then moving it to the right location. Double check that your system's PATH includes the destination folder, otherwise users may have a hard time starting the command.
# Download # Download
curl -sS https://git.io/get-mo -o mo curl -sSL https://git.io/get-mo -o mo
# Make executable # Make executable
chmod +x mo chmod +x mo

5
mo
View File

@@ -146,7 +146,7 @@ moCallFunction() {
moArgs=() moArgs=()
# shellcheck disable=SC2031 # shellcheck disable=SC2031
if [[ -n "$MO_ALLOW_FUNCTION_ARGUMENTS" ]]; then if [[ -n "${MO_ALLOW_FUNCTION_ARGUMENTS-}" ]]; then
moArgs=$3 moArgs=$3
fi fi
@@ -1030,11 +1030,14 @@ moTrimWhitespace() {
# Returns nothing. # Returns nothing.
moUsage() { moUsage() {
grep '^#/' "${MO_ORIGINAL_COMMAND}" | cut -c 4- grep '^#/' "${MO_ORIGINAL_COMMAND}" | cut -c 4-
echo ""
set | grep ^MO_VERSION=
} }
# Save the original command's path for usage later # Save the original command's path for usage later
MO_ORIGINAL_COMMAND="$(cd "${BASH_SOURCE[0]%/*}" || exit 1; pwd)/${BASH_SOURCE[0]##*/}" MO_ORIGINAL_COMMAND="$(cd "${BASH_SOURCE[0]%/*}" || exit 1; pwd)/${BASH_SOURCE[0]##*/}"
MO_VERSION="2.0.4"
# If sourced, load all functions. # If sourced, load all functions.
# If executed, perform the actions as expected. # If executed, perform the actions as expected.