Skip to content

Commit 12e5dc7

Browse files
committed
dist.sh: Copy $KEYFILE to source directory
Because Local.props expects a file inside the source directory. While here, change to source directory at the beginning of the script so the caller does not have to do this.
1 parent f7fdd63 commit 12e5dc7

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

dist.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,13 @@ set -x
4848
### Disable sharing files by default (it causes things not to work properly)
4949
CYGWIN=nontsec
5050

51+
### Change to this script's directory and copy the KEYFILE is any.
52+
cd $(dirname "$0")
53+
if [ -f "$KEYFILE" ]; then
54+
cp "$KEYFILE" .
55+
KEYFILE="$(basename "$KEYFILE")"
56+
fi
57+
5158
. dist-lib.sh
5259

5360
### Overrideable vars
@@ -83,7 +90,7 @@ function main {
8390
### we're building an official release
8491
if [ ! -f "$KEYFILE" ]; then
8592
if [ "$UNOFFICIAL_RELEASE" ]; then
86-
sn -k $KEYFILE
93+
sn -k "$KEYFILE"
8794
else
8895
echo "ERROR! Keyfile $KEYFILE not found."
8996
exit 1

0 commit comments

Comments
 (0)