From 1cca9e4b72b106374f203890b266f18609deefe3 Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Fri, 22 Nov 2019 02:14:25 +0530 Subject: shellcheck fixes --- plugins/upgrade | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'plugins/upgrade') diff --git a/plugins/upgrade b/plugins/upgrade index 8dd3b5a..d166991 100755 --- a/plugins/upgrade +++ b/plugins/upgrade @@ -6,10 +6,10 @@ # Author: Arun Prakash Jana # NOTE: This script installs a package, should be issued with admin privilege -cur=`nnn -v` -new=`curl -s "https://github.com/jarun/nnn/releases/latest" | grep -Eo "[0-9]+\.[0-9]+"` +cur="$(nnn -v)" +new="$(curl -s "https://github.com/jarun/nnn/releases/latest" | grep -Eo "[0-9]+\.[0-9]+")" -if [ $cur_ver == $new_ver ]; then +if [ "$cur" = "$new" ]; then echo 'Already at latest version' exit 0 fi @@ -18,7 +18,7 @@ fi curl -Ls -O "https://github.com/jarun/nnn/releases/download/v$new/nnn_$new-1_debian9.amd64.deb" # install it -sudo dpkg -i nnn_$new-1_debian9.amd64.deb +sudo dpkg -i nnn_"$new"-1_debian9.amd64.deb # remove the file -rm -rf nnn_$new-1_debian9.amd64.deb +rm -rf nnn_"$new"-1_debian9.amd64.deb -- cgit v1.2.3-70-g09d2