Files

21 lines
496 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"