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 23
23
<Import Project =" Sdk.targets" Sdk =" Microsoft.NET.Sdk" />
24
24
25
25
<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)' " />
28
28
</Target >
29
29
30
30
<Target Name =" CoreClean" >
Original file line number Diff line number Diff line change @@ -30,6 +30,10 @@ case "$i" in
30
30
INSTALL_FROM_SOURCE=" ${i#* =} "
31
31
shift # past argument=value
32
32
;;
33
+ --install-location=* )
34
+ INSTALL_LOCATION=" ${i#* =} "
35
+ shift # past argument=value
36
+ ;;
33
37
* )
34
38
# unknown option
35
39
;;
@@ -50,10 +54,11 @@ SYMBOLS="$OUTDIR/payload.sym"
50
54
" $INSTALLER_SRC /layout.sh" --configuration=" $CONFIGURATION " || exit 1
51
55
52
56
if [ $INSTALL_FROM_SOURCE = true ]; then
53
- INSTALL_LOCATION=" /usr/local"
57
+ # INSTALL_LOCATION="/usr/local"
58
+
54
59
mkdir -p " $INSTALL_LOCATION "
55
60
56
- echo " Installing... "
61
+ echo " Installing to $INSTALL_LOCATION "
57
62
58
63
# Install directories
59
64
INSTALL_TO=" $INSTALL_LOCATION /share/gcm-core/"
Original file line number Diff line number Diff line change 6
6
# for additional details.
7
7
set -e
8
8
9
+ installLocation=/usr/local
9
10
is_ci=
10
11
for i in " $@ " ; do
11
12
case " $i " in
12
13
-y)
13
14
is_ci=true
14
15
shift # Past argument=value
15
16
;;
17
+ --install-location=* )
18
+ installLocation=" ${i#* =} "
19
+ shift # past argument=value
20
+ ;;
16
21
esac
17
22
done
18
23
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
+
19
31
# In non-ci scenarios, advertise what we will be doing and
20
32
# give user the option to exit.
21
33
if [ -z $is_ci ]; then
22
34
echo " This script will download, compile, and install Git Credential Manager to:
23
35
24
- /usr/local /bin
36
+ $installLocation /bin
25
37
26
38
Git Credential Manager is licensed under the MIT License: https://aka.ms/gcm/license"
27
39
@@ -225,5 +237,5 @@ if [ -z "$DOTNET_ROOT" ]; then
225
237
fi
226
238
227
239
cd " $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