Shorten method and make it more efficient
This commit is contained in:
parent
b0bcb6d074
commit
9e89f359b9
3
manager
3
manager
@ -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!"
|
||||
|
Reference in New Issue
Block a user