1
0

cleaning up old files

This commit is contained in:
2022-07-16 22:05:38 +02:00
parent fcc120ee5c
commit 52c13341e0
3 changed files with 10 additions and 1 deletions

View File

@@ -24,7 +24,7 @@ URL="https://github.com/starship/starship/releases/download/v${VERSION}/starship
echo "Downloading from ${URL}..."
TARGET="$(download "$URL")"
if [[ -d "${INSTALL_DIR}" ]] ; then
if [[ -f "${INSTALL_DIR}/starship" ]]; then
echo "Removing old starship command..."
rm -f "${INSTALL_DIR}/starship"
fi
@@ -33,3 +33,6 @@ echo "Unpacking starship command to ${INSTALL_DIR}..."
mkdir -p "${INSTALL_DIR}"
tar --directory="${INSTALL_DIR}" -xf "${TARGET}" starship
chmod +x "${INSTALL_DIR}/starship"
echo "Removing ${TARGET}..."
rm -f "${TARGET}"