File tree Expand file tree Collapse file tree 3 files changed +24
-7
lines changed
src/linux/Packaging.Linux Expand file tree Collapse file tree 3 files changed +24
-7
lines changed Original file line number Diff line number Diff line change 2323 <Import Project =" Sdk.targets" Sdk =" Microsoft.NET.Sdk" />
2424
2525 <Target Name =" CoreCompile" Condition =" '$(OSPlatform)'=='linux'" >
26- <Message Text =" $(MSBuildProjectDirectory)\build.sh --install-from-source=$(InstallFromSource) --configuration='$(Configuration)' --version='$(Version)'" Importance =" High" />
27- <Exec Command =" $(MSBuildProjectDirectory)\build.sh --install-from-source=$(InstallFromSource) --configuration='$(Configuration)' --version='$(Version)'" />
26+ <Message Text =" $(MSBuildProjectDirectory)\build.sh --install-from-source=$(InstallFromSource) --configuration='$(Configuration)' --version='$(Version)' --install-location='$(InstallLocation)' " Importance =" High" />
27+ <Exec Command =" $(MSBuildProjectDirectory)\build.sh --install-from-source=$(InstallFromSource) --configuration='$(Configuration)' --version='$(Version)' --install-location='$(InstallLocation)' " />
2828 </Target >
2929
3030 <Target Name =" CoreClean" >
Original file line number Diff line number Diff line change @@ -30,6 +30,10 @@ case "$i" in
3030 INSTALL_FROM_SOURCE=" ${i#* =} "
3131 shift # past argument=value
3232 ;;
33+ --install-location=* )
34+ INSTALL_LOCATION=" ${i#* =} "
35+ shift # past argument=value
36+ ;;
3337 * )
3438 # unknown option
3539 ;;
@@ -50,10 +54,11 @@ SYMBOLS="$OUTDIR/payload.sym"
5054" $INSTALLER_SRC /layout.sh" --configuration=" $CONFIGURATION " || exit 1
5155
5256if [ $INSTALL_FROM_SOURCE = true ]; then
53- INSTALL_LOCATION=" /usr/local"
57+ # INSTALL_LOCATION="/usr/local"
58+
5459 mkdir -p " $INSTALL_LOCATION "
5560
56- echo " Installing... "
61+ echo " Installing to $INSTALL_LOCATION "
5762
5863 # Install directories
5964 INSTALL_TO=" $INSTALL_LOCATION /share/gcm-core/"
Original file line number Diff line number Diff line change 66# for additional details.
77set -e
88
9+ installLocation=/usr/local
910is_ci=
1011for i in " $@ " ; do
1112 case " $i " in
1213 -y)
1314 is_ci=true
1415 shift # Past argument=value
1516 ;;
17+ --install-location=* )
18+ installLocation=" ${i#* =} "
19+ shift # past argument=value
20+ ;;
1621 esac
1722done
1823
24+
25+ # If pass the install-location check if it exists
26+ if [! -d " $installLocation " ]; then
27+ echo " The folder $installLocation do not exists"
28+ exit
29+ fi
30+
1931# In non-ci scenarios, advertise what we will be doing and
2032# give user the option to exit.
2133if [ -z $is_ci ]; then
2234 echo " This script will download, compile, and install Git Credential Manager to:
2335
24- /usr/local /bin
36+ $installLocation /bin
2537
2638Git Credential Manager is licensed under the MIT License: https://aka.ms/gcm/license"
2739
@@ -225,5 +237,5 @@ if [ -z "$DOTNET_ROOT" ]; then
225237fi
226238
227239cd " $toplevel_path "
228- $sudo_cmd env " PATH=$PATH " $DOTNET_ROOT /dotnet build ./src/linux/Packaging.Linux/Packaging.Linux.csproj -c Release -p:InstallFromSource=true
229- add_to_PATH " /usr/local/bin "
240+ $sudo_cmd env " PATH=$PATH " $DOTNET_ROOT /dotnet build ./src/linux/Packaging.Linux/Packaging.Linux.csproj -c Release -p:InstallFromSource=true -p:InstallLocation= $installLocation
241+ add_to_PATH $installLocation
You can’t perform that action at this time.
0 commit comments