Skip to content

Commit

Permalink
Improved install script (#2263)
Browse files Browse the repository at this point in the history
* Remove unused variable in install script

* Remove previous files when installing maestro-cli
  • Loading branch information
Fishbowler authored Jan 20, 2025
1 parent bb41dd0 commit 7e36679
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ export MAESTRO_DIR
# Local variables
maestro_tmp_folder="${MAESTRO_DIR}/tmp"
maestro_bash_profile="${HOME}/.bash_profile"
maestro_profile="${HOME}/.profile"
maestro_bashrc="${HOME}/.bashrc"
maestro_zshrc="${ZDOTDIR:-${HOME}}/.zshrc"

Expand Down Expand Up @@ -114,6 +113,15 @@ if [[ "$cygwin" == 'true' ]]; then
fi
unzip -qo "$maestro_zip_file" -d "$maestro_tmp_folder"

# Empty destinations
echo "* Remove previous installation (if any)"
if [[ -d "$MAESTRO_DIR/lib" ]]; then
rm -rf "${MAESTRO_DIR:?}/lib"
fi
if [[ -d "$MAESTRO_DIR/bin" ]]; then
rm -rf "${MAESTRO_DIR:?}/bin"
fi

# Copy in place
echo "* Copying archive contents..."
cp -rf "${maestro_tmp_folder}"/maestro/* "$MAESTRO_DIR"
Expand Down

0 comments on commit 7e36679

Please sign in to comment.