Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions install.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -108,18 +108,30 @@ SET COMMANDS_WITHOUT_REPO=git-alias git-extras git-fork git-setup

echo Installing binaries...
FOR /R "%GITEXTRAS%\bin" %%i in (*.*) DO (
:: Fixation for Windows 10.0.17134 Build 17134 (Won't install without /E)
:: Echo file being written for testing
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO, these two comments don't look like necessary. The first one could be put just before MORE command, and the second one is too straightforward.

IF "%DEBUG%=="true" ( ECHO "Writing File: %PREFIX%\bin\%%~ni" )

ECHO #^^!/usr/bin/env bash > "%PREFIX%\bin\%%~ni"
TYPE "%GITEXTRAS%\helper\reset-env" >> "%PREFIX%\bin\%%~ni"
TYPE "%GITEXTRAS%\helper\git-extra-utility" >> "%PREFIX%\bin\%%~ni"
TYPE "%GITEXTRAS%\helper\is-git-repo" >> "%PREFIX%\bin\%%~ni"
MORE +2 "%GITEXTRAS%\bin\%%~ni" >> "%PREFIX%\bin\%%~ni"

REM Added /E Option for Installation Fix On Windows 10 Higher Version
MORE /E +2 "%GITEXTRAS%\bin\%%~ni" >> "%PREFIX%\bin\%%~ni"
)

FOR %%i in (%COMMANDS_WITHOUT_REPO%) DO (
:: Fixation for Windows 10.0.17134 Build 17134 (Won't install without /E)
:: Echo file being written for testing
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto.

IF "%DEBUG%=="true" ( ECHO "Writing File: %PREFIX%\bin\%%i" )

ECHO #^^!/usr/bin/env bash > "%PREFIX%\bin\%%i"
TYPE "%GITEXTRAS%\helper\reset-env" >> "%PREFIX%\bin\%%i"
TYPE "%GITEXTRAS%\helper\git-extra-utility" >> "%PREFIX%\bin\%%i"
MORE +2 "%GITEXTRAS%\bin\%%i" >> "%PREFIX%\bin\%%i"

:: Added /E Option for Installation Fix On Windows 10 Higher Version
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be safer to use REM instead of :: in the block.
https://stackoverflow.com/a/42148114/2278997

MORE /E +2 "%GITEXTRAS%\bin\%%i" >> "%PREFIX%\bin\%%i"
)

echo Installing man pages...
Expand Down