From 4adc96bfa3e7dadb8bf35697fda1c732ec6186c1 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Wed, 12 Mar 2014 18:13:47 +0100 Subject: Rename executable_name -> _sti_executable `executable_name' conflicts with a variable used in one of the commands. To make it clear that it is a special name add a `_' in front of it. --- sti | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/sti b/sti index 80521d5..f89a9c1 100755 --- a/sti +++ b/sti @@ -15,7 +15,7 @@ # You should have received a copy of the GNU General Public License # along with sti. If not, see . -executable_name="$(basename $0)" +_sti_executable="$(basename $0)" data_home="${XDG_DATA_HOME:-${HOME}/.local/share}/sti" bin_home="${HOME}/usr/bin" @@ -66,7 +66,7 @@ function cmd_help local prefix="help" dispatch "$@" else - echo "Usage: ${executable_name} ARG" + echo "Usage: ${_sti_executable} ARG" echo echo "Commands include: " echo " help Show this help message" @@ -76,14 +76,14 @@ function cmd_help echo " remove Remove an installed tool" echo " update Update an installed tool" echo - echo "You can use \`${executable_name} help ' to get \ + echo "You can use \`${_sti_executable} help ' to get \ more information about a command." | fold fi } function help_list () { - echo "Usage: ${executable_name} list" + echo "Usage: ${_sti_executable} list" echo echo "List all downloaded (possibly installed) tools." | fold } @@ -95,10 +95,10 @@ function cmd_list function help_reinit () { - echo "Usage: ${executable_name} reinit TOOL" + echo "Usage: ${_sti_executable} reinit TOOL" echo echo "TOOL should be the name of a tool installed previously with \ -\`${executable_name} install'. This name is the base name of the URL \ +\`${_sti_executable} install'. This name is the base name of the URL \ used to install the tool, with the \`.git' suffix removed." | fold echo echo "Each executable file found in the tool's directory is checked \ @@ -118,7 +118,7 @@ function cmd_reinit () function help_install () { - echo "Usage: ${executable_name} install URL" + echo "Usage: ${_sti_executable} install URL" echo echo "URL should be a valid argument to \`git clone'." echo @@ -150,10 +150,10 @@ function cmd_install () function help_remove () { - echo "Usage: ${executable_name} remove TOOL" + echo "Usage: ${_sti_executable} remove TOOL" echo echo "TOOL should be the name of a tool installed previously with \ -\`${executable_name} install'. This name is the base name of the URL \ +\`${_sti_executable} install'. This name is the base name of the URL \ used to install the tool, with the \`.git' suffix removed." | fold echo echo "Any executable files found in the directory of TOOL will have \ @@ -178,15 +178,15 @@ function cmd_remove () function help_update { - echo "Usage: ${executable_name} update TOOL" + echo "Usage: ${_sti_executable} update TOOL" echo echo "TOOL should be the name of a tool installed previously with \ -\`${executable_name} install'. This name is the base name of the URL \ +\`${_sti_executable} install'. This name is the base name of the URL \ used to install the tool, with the \`.git' suffix removed." | fold echo echo "This command removes all the executables from \`${data_home}' \ -just as \`${executable_name} remove' would, calls \`git pull' in TOOL's \ -directory and then reinstalls the executables as \`${executable_name} \ +just as \`${_sti_executable} remove' would, calls \`git pull' in TOOL's \ +directory and then reinstalls the executables as \`${_sti_executable} \ reinit' would." } -- cgit v1.2.3-54-g00ecf