Skip to content

Commit a0bd1d3

Browse files
committed
Fix Linux args passing
1 parent 4e85421 commit a0bd1d3

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

Assets/PatchKit Patcher/Editor/PatcherManifestCreator.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,12 @@ private static Manifest LinuxManifest(string buildPath)
100100
Capabilities = Capabilities(),
101101
Arguments = new Manifest.Argument[] {
102102
CreateManifestAgument(launchScriptPath),
103-
CreateManifestAgument("--exedir", "\"{exedir}\""),
104-
CreateManifestAgument("--secret", "\"{secret}\""),
105-
CreateManifestAgument("--installdir", "\"{installdir}\""),
103+
CreateManifestAgument("--exedir", "{exedir}"),
104+
CreateManifestAgument("--secret", "{secret}"),
105+
CreateManifestAgument("--installdir", "{installdir}"),
106106
CreateManifestAgument("--network-status", "{network-status}"),
107-
CreateManifestAgument("--patcher-exe", "\"" + patcherExe + "\""),
108-
CreateManifestAgument("--lockfile", "\"{lockfile}\""),
107+
CreateManifestAgument("--patcher-exe", patcherExe),
108+
CreateManifestAgument("--lockfile", "{lockfile}"),
109109
}
110110
};
111111
}

Assets/PatchKit Patcher/Editor/patcher.template.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,45 +27,45 @@ while [ "$1" != "" ] && [ "$2" != "" ]; do
2727
shift
2828
done
2929

30-
if [ -z $PATCHER_EXE ]
30+
if [ -z "$PATCHER_EXE" ]
3131
then
3232
echo "Missing --patcher-exe argument"
3333
exit 1
3434
fi
3535

36-
if [ -z $EXEDIR ]
36+
if [ -z "$EXEDIR" ]
3737
then
3838
echo "Missing --exedir argument"
3939
exit 1
4040
fi
4141

42-
if [ -z $SECRET ]
42+
if [ -z "$SECRET" ]
4343
then
4444
echo "Missing --secret argument"
4545
exit 1
4646
fi
4747

48-
if [ -z $INSTALLDIR ]
48+
if [ -z "$INSTALLDIR" ]
4949
then
5050
echo "Missing --installdir argument"
5151
exit 1
5252
fi
5353

54-
LD_DIRS="`find "$EXEDIR" -name "x86_64" -printf "%p:"`"
55-
LD_DIRS="$LD_DIRS`find "$EXEDIR" -name "x86" -printf "%p:"`"
54+
LD_DIRS_X64=`find "$EXEDIR" -name "x86_64" -printf "%p:"`
55+
LD_DIRS_X86=`find "$EXEDIR" -name "x86" -printf "%p:"`
5656

57-
export LD_LIBRARY_PATH="$LD_DIRS"
57+
export LD_LIBRARY_PATH="$LD_DIRS_X64:$LD_DIRS_X86"
5858

59-
ARGS="--installdir $INSTALLDIR --secret $SECRET"
59+
ARGS="--installdir \"$INSTALLDIR\" --secret $SECRET"
6060

6161
if [ ! -z "$LOCKFILE" ]
6262
then
63-
ARGS="$ARGS --lockfile $LOCKFILE"
63+
ARGS="$ARGS --lockfile \"$LOCKFILE\""
6464
fi
6565

6666
if [ ! -z "$NETWORK_STATUS" ]
6767
then
6868
ARGS="$ARGS --${NETWORK_STATUS}"
6969
fi
7070

71-
"$EXEDIR/$PATCHER_EXE" $ARGS
71+
sh -c "\"$EXEDIR/$PATCHER_EXE\" $ARGS"

0 commit comments

Comments
 (0)