diff --git a/appended b/appended deleted file mode 100644 index e69de29..0000000 diff --git a/tools/erase_lines b/tools/erase_lines index c45f4ce..c5f5cdf 100755 --- a/tools/erase_lines +++ b/tools/erase_lines @@ -3,7 +3,7 @@ # Clears the entire current line regardless of terminal size. # See the magic by running: # { sleep 1; clear_this_line ; }& -clear_this_line() { +function clear_this_line { printf '\r' cols="$(tput cols)" for i in $(seq "$cols"); do @@ -16,7 +16,7 @@ clear_this_line() { # Usage: erase_lines [AMOUNT] # See the magic by running: # { sleep 1; erase_lines 2; }& -erase_lines() { +function erase_lines { # Default line count to 1. test -z "$1" && lines="1" || lines="$1" diff --git a/tools/idem_apt_install b/tools/idem_apt_install index 1167ace..a00468d 100755 --- a/tools/idem_apt_install +++ b/tools/idem_apt_install @@ -1,6 +1,6 @@ #!/bin/bash -function usage() { +function usage { local BASECMD BASECMD=$(basename "$0") echo "usage: $BASECMD " diff --git a/tools/semver_git_tag b/tools/semver_git_tag index 14851f0..093a0bb 100755 --- a/tools/semver_git_tag +++ b/tools/semver_git_tag @@ -1,6 +1,6 @@ #!/bin/bash -function usage() { +function usage { echo 'usage: --major | -M | --minor | -m | --patch | -p' exit 1 } diff --git a/tools/wget_semver b/tools/wget_semver index 151e305..2f2aa09 100755 --- a/tools/wget_semver +++ b/tools/wget_semver @@ -3,7 +3,7 @@ REPO_TYPE=$1 REPO_NAME=$2 -function usage() { +function usage { local BASECMD=$(basename "$0") echo 'usage: [DESTINATION]' echo 'example:' @@ -14,7 +14,7 @@ function usage() { exit -1 } -function get_github() { +function get_github { local all_releases=$(git ls-remote --tags --sort="v:refname" https://github.com/"$REPO_NAME" | grep -Eo "v?([0-9]+\.){2}[0-9]+$") # extract only VERSION without 'v' @@ -33,7 +33,7 @@ function get_github() { fi } -function get_artcode() { +function get_artcode { release=$(git ls-remote --tags --sort="v:refname" \ https://git.artcode.re/$REPO_NAME | tail -n1 | cut -f2 | cut -d '/' -f3)