changeset 689:a9fbb21ab09c

[setup] shellcheck-ed
author nanaya <me@nanaya.pro>
date Fri, 21 Oct 2022 20:21:47 +0900
parents 17cacf387f7c
children 5b98946be635
files setup
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/setup	Fri Oct 21 20:17:06 2022 +0900
+++ b/setup	Fri Oct 21 20:21:47 2022 +0900
@@ -21,8 +21,6 @@
 # FIXME: test existence of the directories.
 # dotfiles
 rcdir="${basedir}/rc"
-# misc scripts
-bindir="${basedir}/bin"
 
 # Make sure $HOME points somewhere and writable.
 test -n "${HOME}" || exit 1
@@ -41,7 +39,9 @@
   case "$1" in
     uninstall|install)
       _rc "${1}" "cshrc" ".ec.tcsh"
+      # shellcheck disable=SC2016
       _init "${1}" 'test -r "${HOME}/.ec.tcsh" && source "${HOME}/.ec.tcsh" #ECCORE_TCSH' ".cshrc"
+      # shellcheck disable=SC2016
       _init "${1}" 'test -r "${HOME}/.ec.tcsh" && source "${HOME}/.ec.tcsh" #ECCORE_TCSH' ".tcshrc"
     ;;
   esac
@@ -51,7 +51,9 @@
   case "${1}" in
     uninstall|install)
       _rc "${1}" "bashrc" ".ec.bash"
+      # shellcheck disable=SC2016
      _init "${1}" '[ -r "${HOME}/.ec.bash" ] && . "${HOME}/.ec.bash" #ECCORE_BASH' ".bash_profile"
+      # shellcheck disable=SC2016
      _init "${1}" '[ -r "${HOME}/.ec.bash" ] && . "${HOME}/.ec.bash" #ECCORE_BASH' ".bashrc"
     ;;
   esac
@@ -61,6 +63,7 @@
   case "${1}" in
     uninstall|install)
       _rc "${1}" "kshrc" ".ec.ksh"
+      # shellcheck disable=SC2016
       _init "${1}" '[ -r "${HOME}/.ec.ksh" ] && . "${HOME}/.ec.ksh" #ECCORE_KSH' ".profile"
     ;;
   esac
@@ -70,6 +73,7 @@
   case "${1}" in
     uninstall|install)
       _rc "${1}" "zshrc" ".ec.zsh"
+      # shellcheck disable=SC2016
       _init "${1}" '[ -r "${HOME}/.ec.zsh" ] && . "${HOME}/.ec.zsh" #ECCORE_ZSH' ".zshrc"
     ;;
   esac
@@ -130,7 +134,7 @@
   shift
 
   touch "${@}"
-  _echo "Ensured existence of ${@}"
+  _echo "Ensured existence of ${*}"
 }
 
 _tmux() {