diff options
author | Arun Prakash Jana <engineerarun@gmail.com> | 2019-11-22 02:14:25 +0530 |
---|---|---|
committer | Arun Prakash Jana <engineerarun@gmail.com> | 2019-11-22 11:13:34 +0530 |
commit | 1cca9e4b72b106374f203890b266f18609deefe3 (patch) | |
tree | 9f281f4b4de296c54d13dc9c7e214f58835636a7 /plugins/upgrade | |
parent | ee2dcb1de7d3e82b330f49ee9fb5dfd4608207ff (diff) | |
download | nnn-1cca9e4b72b106374f203890b266f18609deefe3.tar.gz |
shellcheck fixes
Diffstat (limited to 'plugins/upgrade')
-rwxr-xr-x | plugins/upgrade | 10 |
1 files changed, 5 insertions, 5 deletions
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 |