Skip to content

Commit

Permalink
Fix cp-R for linux, xcopy for windows in installers (#1686)
Browse files Browse the repository at this point in the history
fix cp-R for linux, xcopy for windows in installers
  • Loading branch information
haydenbaker authored Mar 17, 2023
1 parent 609cb16 commit 885002b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions smithy-cli/config/install
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ set_global_vars() {
SMITHY_VERSION=$($INSTALLER_EXE --version)

INSTALL_DIR="$ROOT_INSTALL_DIR/$SMITHY_VERSION"
# INSTALL_DIR="$INSTALL_DIR"

CURRENT_INSTALL_DIR="$ROOT_INSTALL_DIR/current"
CURRENT_SMITHY_EXE="$CURRENT_INSTALL_DIR/bin/$EXE_NAME"
Expand All @@ -79,7 +78,7 @@ create_install_dir() {
echo "Installing Smithy CLI to '$INSTALL_DIR'..."
mkdir -p "$INSTALL_DIR" || exit 1
{
cp -R "$INSTALLER_DIR/" "$INSTALL_DIR" &&
cp -R "$INSTALLER_DIR/." "$INSTALL_DIR/." &&
ln -snf "$INSTALL_DIR" "$CURRENT_INSTALL_DIR"
} || {
rm -rf "$INSTALL_DIR"
Expand Down
2 changes: 1 addition & 1 deletion smithy-cli/config/install.bat
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ if exist "%choice_path%" goto upgrade
) > "%installer_path%\%exe_name%.bat"

:: Copy the installation
xcopy /i /h /e "%installer_path%\*" "%choice_path%\"
xcopy /i /h /e /k "%installer_path%*" "%choice_path%\"
setx path "%path%;%choice_path%\;"
call %exe_name% warmup
echo You may now run '%exe_name% --version'
Expand Down

0 comments on commit 885002b

Please sign in to comment.