From 2089e964525d3f8edeec16933ef377e6f79d82cb Mon Sep 17 00:00:00 2001 From: Tiago Almeida Date: Wed, 11 Dec 2019 19:30:15 +0000 Subject: [PATCH] Shellcheck --- install.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 86058f6..294d2ab 100755 --- a/install.sh +++ b/install.sh @@ -146,12 +146,16 @@ f_set_variable(){ f_get_nanorcs(){ lite="" - cd nanorc/ + if cd nanorc/; then + printf "\n Error: Cannot open or access '%s' directory." "nanorc/" + exit 1 + done + for file in *; do [ -e "$file" ] || continue - if [ -z $(find "../original/" -name "$file") ]; then - lite=`printf "%s\ninclude %s" "$lite" "$file"` + if [ -z "$(find "../original/" -name "$file")" ]; then + lite="$(printf "%s\ninclude %s" "$lite" "$file")" fi done