Skip to content

Commit 53e2b48

Browse files
committed
install from source: custom install location edits
Update custom install to define a default path in `Packaging.Linux.csproj`. Include a few spelling/grammar/refactoring tweaks as well.
1 parent 5c50a73 commit 53e2b48

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

src/linux/Packaging.Linux/Packaging.Linux.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
<PropertyGroup>
1111
<InstallFromSource>false</InstallFromSource>
12+
<InstallLocation>/usr/local</InstallLocation>
1213
</PropertyGroup>
1314

1415
<ItemGroup>

src/linux/Packaging.Linux/build.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ case "$i" in
4040
esac
4141
done
4242

43+
# Ensure install location exists
44+
if [! -d "$installLocation" ]; then
45+
mkdir -p "$INSTALL_LOCATION"
46+
fi
47+
4348
# Perform pre-execution checks
4449
CONFIGURATION="${CONFIGURATION:=Debug}"
4550
if [ -z "$VERSION" ]; then
@@ -54,10 +59,6 @@ SYMBOLS="$OUTDIR/payload.sym"
5459
"$INSTALLER_SRC/layout.sh" --configuration="$CONFIGURATION" || exit 1
5560

5661
if [ $INSTALL_FROM_SOURCE = true ]; then
57-
#INSTALL_LOCATION="/usr/local"
58-
59-
mkdir -p "$INSTALL_LOCATION"
60-
6162
echo "Installing to $INSTALL_LOCATION"
6263

6364
# Install directories

src/linux/Packaging.Linux/install-from-source.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
# for additional details.
77
set -e
88

9-
installLocation=/usr/local
109
is_ci=
1110
for i in "$@"; do
1211
case "$i" in
@@ -21,10 +20,14 @@ for i in "$@"; do
2120
esac
2221
done
2322

23+
# If install-location is not passed, use default value
24+
if [ -z "$installLocation" ]; then
25+
installLocation=/usr/local
26+
fi
2427

25-
# If pass the install-location check if it exists
28+
# Ensure install location exists
2629
if [! -d "$installLocation" ]; then
27-
echo "The folder $installLocation do not exists"
30+
echo "The folder $installLocation does not exist"
2831
exit
2932
fi
3033

0 commit comments

Comments
 (0)