File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 2
2
3
3
set -eo pipefail
4
4
5
- : " ${TMP_DIR :=/ tmp } "
5
+ : " ${DOWNLOAD_DIR := ${PWD} / .downloads } "
6
6
: " ${PREVIEW:= false} "
7
7
8
8
function isTrue() {
@@ -67,7 +67,7 @@ if [[ ${DEBUG^^} == TRUE ]]; then
67
67
echo " current directory is $( pwd) "
68
68
fi
69
69
70
- export HOME=/data
70
+ export HOME=" ${PWD} "
71
71
72
72
downloadPage=https://www.minecraft.net/en-us/download/server/bedrock
73
73
104
104
105
105
if [[ ! -f " bedrock_server-${VERSION} " ]]; then
106
106
107
- [[ $TMP_DIR != /tmp ]] && mkdir -p " $TMP_DIR "
108
- TMP_ZIP=" $TMP_DIR /$( basename " ${DOWNLOAD_URL} " ) "
107
+ [[ $DOWNLOAD_DIR != /tmp ]] && mkdir -p " $DOWNLOAD_DIR "
108
+ TMP_ZIP=" $DOWNLOAD_DIR /$( basename " ${DOWNLOAD_URL} " ) "
109
109
110
110
echo " Downloading Bedrock server version ${VERSION} ..."
111
111
if ! curl " ${curlArgs[@]} " -o " ${TMP_ZIP} " -A " itzg/minecraft-bedrock-server" -fsSL " ${DOWNLOAD_URL} " ; then
@@ -146,7 +146,7 @@ if [[ ! -f "bedrock_server-${VERSION}" ]]; then
146
146
# Do not overwrite existing files, which means the cleanup above needs to account for things
147
147
# that MUST be replaced on upgrade
148
148
unzip -q -n " ${TMP_ZIP} "
149
- [[ $TMP_DIR != /tmp ]] && rm -rf " $TMP_DIR "
149
+ [[ $DOWNLOAD_DIR != /tmp ]] && rm -rf " $DOWNLOAD_DIR "
150
150
151
151
chmod +x bedrock_server
152
152
mv bedrock_server " bedrock_server-${VERSION} "
You can’t perform that action at this time.
0 commit comments