Shorten method and make it more efficient

This commit is contained in:
Alex D. 2018-12-24 17:53:06 +01:00
parent b0bcb6d074
commit 9e89f359b9

View File

@ -192,8 +192,7 @@ function selfupdate {
cd ~/bin || exit
output "info" "Self-updating:"
[ -n $(git diff --name-only origin/master | grep manager) ] && {
git clean -fd && \
git reset --hard HEAD && \
git reset --hard origin/master
git pull https://github.com/RXCommunity/manager master
} || {
output "info" "Already latest version!"