mirror of
https://github.com/wahyd4/gvm.git
synced 2026-08-09 12:56:41 +10:00
21 lines
497 B
Bash
Executable File
21 lines
497 B
Bash
Executable File
#!/bin/bash
|
|
. $GVM_ROOT/scripts/functions
|
|
|
|
[[ -d $GVM_ROOT/.git ]] || mv $GVM_ROOT/git.bak $GVM_ROOT/.git &> /dev/null ||
|
|
display_error "Couldn't find git info"
|
|
|
|
cd $GVM_ROOT && git checkout -f ||
|
|
display_error "Failed to clean install"
|
|
|
|
if [[ -n $1 ]]; then
|
|
cd $GVM_ROOT && git checkout $1 -f ||
|
|
display_error "Failed to checkout $1 branch"
|
|
fi
|
|
|
|
cd $GVM_ROOT && git pull ||
|
|
display_error "Failed to update"
|
|
|
|
mv $GVM_ROOT/.git $GVM_ROOT/git.bak ||
|
|
display_error "Couldn't backup git info"
|
|
|