File tree 1 file changed +12
-10
lines changed
1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -60,15 +60,6 @@ set -x
60
60
61
61
readonly BUNDLE_PATH=" $1 "
62
62
63
- if [[ " ${BUNDLE_PATH} " == http* ]]; then
64
- cd " $( mktemp --directory) "
65
- wget " ${BUNDLE_PATH} "
66
- BUNDLE_FILE_PATH=" ${PWD} /$( find . -name ' *.tgz' ) "
67
- readonly BUNDLE_FILE_PATH
68
- else
69
- readonly BUNDLE_FILE_PATH=" ${BUNDLE_PATH} "
70
- fi
71
-
72
63
# Historically, the TinyPilot bundle was unpacked to the device's disk, where it
73
64
# persisted. Since then, we've moved to the use of a volatile RAMdisk, which
74
65
# avoids excessive writes to the filesystem. As a result, this legacy installer
@@ -142,11 +133,22 @@ readonly TMPDIR="${INSTALLER_DIR}/tmp"
142
133
export TMPDIR
143
134
mkdir " ${TMPDIR} "
144
135
136
+ if [[ " ${BUNDLE_PATH} " == http* ]]; then
137
+ readonly BUNDLE_FILE=" ${INSTALLER_DIR} /bundle.tgz"
138
+ curl " ${BUNDLE_PATH} " \
139
+ --location \
140
+ --output " ${BUNDLE_FILE} " \
141
+ --show-error \
142
+ --silent
143
+ else
144
+ readonly BUNDLE_FILE=" ${BUNDLE_PATH} "
145
+ fi
146
+
145
147
# Extract tarball to installer directory.
146
148
tar \
147
149
--gunzip \
148
150
--extract \
149
- --file " ${BUNDLE_FILE_PATH } " \
151
+ --file " ${BUNDLE_FILE } " \
150
152
--directory " ${INSTALLER_DIR} "
151
153
152
154
# Run install.
You can’t perform that action at this time.
0 commit comments