Simplify install command
This commit is contained in:
@@ -54,6 +54,15 @@ command -v git >/dev/null 2>&1 || {
|
||||
exit 1
|
||||
}
|
||||
|
||||
if [[ -e "${APP_DIR}" && ! -d "${APP_DIR}/.git" ]]; then
|
||||
echo "${APP_DIR} already exists but is not a git repository." >&2
|
||||
echo "Please move it away, or rerun with --force to replace it." >&2
|
||||
if [[ "${FORCE}" != "1" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
rm -rf "${APP_DIR}"
|
||||
fi
|
||||
|
||||
if [[ -d "${APP_DIR}/.git" ]]; then
|
||||
cd "${APP_DIR}"
|
||||
git fetch origin
|
||||
|
||||
Reference in New Issue
Block a user