From 18d96c1ab81dfc304d896031dba726a93de8b3ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Mon, 24 Jun 2019 12:21:11 +0200 Subject: [PATCH] Remove useless checks, formatting --- install.sh | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/install.sh b/install.sh index afb92d3..c26cc80 100755 --- a/install.sh +++ b/install.sh @@ -8,10 +8,7 @@ fi _fetch_sources(){ wget -O /tmp/nanorc.zip https://github.com/scopatz/nanorc/archive/master.zip - if [ ! -d ~/.nano/ ] - then - mkdir ~/.nano/ - fi + mkdir -p ~/.nano/ cd ~/.nano/ || exit unzip -o "/tmp/nanorc.zip" @@ -21,11 +18,8 @@ _fetch_sources(){ } _update_nanorc(){ - if [ ! -f ~/.nanorc ] - then - touch ~/.nanorc - fi - + touch ~/.nanorc + # add all includes from ~/.nano/nanorc if they're not already there while read -r inc; do if ! grep -q "$inc" "${NANORC_FILE}"; then @@ -42,10 +36,10 @@ NANORC_FILE=~/.nanorc case "$1" in -l|--lite) - UPDATE_LITE=1;; + UPDATE_LITE=1;; -h|--help) - echo "Install script for nanorc syntax highlights" - echo "Call with -l or --lite to update .nanorc with secondary precedence to existing .nanorc includes" + echo "Install script for nanorc syntax highlights" + echo "Call with -l or --lite to update .nanorc with secondary precedence to existing .nanorc includes" ;; esac