Skip to content

Commit

Permalink
Feat: check prior installation before installing
Browse files Browse the repository at this point in the history
  • Loading branch information
mihaiconstantin committed May 11, 2023
1 parent 905af00 commit d0eb79a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,18 @@ BIN_DIR=/usr/local/bin
# Create the full path for the `paperer` installation.
INSTALL_DIR=$INSTALL_DIR/paperer

# If `paperer` is already installed.
if [ -d "$INSTALL_DIR" ]; then
# Ask the users to uninstall or update it instead.
echo " (!) Error: 'paperer' is already installed. Please first uninstall or update using 'paperer --update'." >&2

# Exit with error code.
exit 1
else
# Indicate that no prior installation was found.
echo " + No prior installation of 'paperer' detected."
fi

# User feedback.
echo " + Cloning the 'paperer' repository..."

Expand Down

0 comments on commit d0eb79a

Please sign in to comment.