mirror of
https://github.com/parkervcp/eggs.git
synced 2024-11-14 13:57:21 +08:00
reduce excess if block
This commit is contained in:
parent
c3ec1c1a7c
commit
c583f4b2fe
@ -3,7 +3,7 @@
|
||||
"meta": {
|
||||
"version": "PTDL_v1"
|
||||
},
|
||||
"exported_at": "2020-12-08T11:59:05-08:00",
|
||||
"exported_at": "2020-12-13T18:26:08-08:00",
|
||||
"name": "Mohist",
|
||||
"author": "alex.chang-lam@protonmail.com",
|
||||
"description": "Spigot fork with performance optimizations.",
|
||||
@ -18,7 +18,7 @@
|
||||
},
|
||||
"scripts": {
|
||||
"installation": {
|
||||
"script": "#!\/bin\/bash\r\n# Mohist Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\napt update\r\napt install -y curl\r\n\r\n#Go into main direction\r\nif [ ! -d \/mnt\/server ]; then\r\n mkdir \/mnt\/server\r\nfi\r\n\r\ncd \/mnt\/server\r\n\r\nif [ ! -z ${BUILD_VERSION} ]; then\r\n DOWNLOAD_LINK=https:\/\/mohistmc.com\/api\/${MC_VERSION}\/${BUILD_VERSION}\/download\r\n \r\n #Downloading jars\r\n echo -e \"Download link is ${DOWNLOAD_LINK}\"\r\n echo -e \"Downloading build version ${BUILD_VERSION}\"\r\n if [ ! -z \"${DOWNLOAD_LINK}\" ]; then \r\n if curl --output \/dev\/null --silent --head --fail ${DOWNLOAD_LINK}-server.jar; then\r\n echo -e \"Download link is valid.\"\r\n else\r\n echo -e \"Link is invalid closing out\"\r\n exit 2\r\n fi\r\n fi\r\n\r\n curl -s -o server.jar -sS ${DOWNLOAD_LINK}\r\n\r\n #Checking if downloaded jars exist\r\n if [ ! -f .\/server.jar ]; then\r\n echo \"!!! Error downloading build version ${BUILD_VERSION} !!!\"\r\n exit\r\n fi\r\nelse\r\n DOWNLOAD_LINK=https:\/\/mohistmc.com\/api\/${MC_VERSION}\/${BUILD_TYPE}\/download\r\n\r\n #Downloading jars\r\n echo -e \"Download link is ${DOWNLOAD_LINK}\"\r\n echo -e \"Downloading ${BUILD_TYPE} build version\"\r\n if [ ! -z \"${DOWNLOAD_LINK}\" ]; then \r\n if curl --output \/dev\/null --silent --head --fail ${DOWNLOAD_LINK}-server.jar; then\r\n echo -e \"Download link is valid.\"\r\n else\r\n echo -e \"Link is invalid closing out\"\r\n exit 2\r\n fi\r\n fi\r\n\r\n curl -s -o server.jar -sS ${DOWNLOAD_LINK}\r\n\r\n #Checking if downloaded jars exist\r\n if [ ! -f .\/server.jar ]; then\r\n echo \"!!! Error downloading ${BUILD_TYPE} build !!!\"\r\n exit\r\n fi\r\nfi",
|
||||
"script": "#!\/bin\/bash\r\n# Mohist Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\napt update\r\napt install -y curl\r\n\r\n#Go into main direction\r\nif [ ! -d \/mnt\/server ]; then\r\n mkdir \/mnt\/server\r\nfi\r\n\r\ncd \/mnt\/server\r\n\r\nif [ ! -z ${BUILD_VERSION} ]; then\r\n DOWNLOAD_LINK=https:\/\/mohistmc.com\/api\/${MC_VERSION}\/${BUILD_VERSION}\/download\r\nelse\r\n DOWNLOAD_LINK=https:\/\/mohistmc.com\/api\/${MC_VERSION}\/${BUILD_TYPE}\/download\r\nfi\r\n\r\n#Downloading jars\r\necho -e \"Download link is ${DOWNLOAD_LINK}\"\r\necho -e \"Downloading build version ${BUILD_VERSION}\"\r\nif [ ! -z \"${DOWNLOAD_LINK}\" ]; then \r\n if curl --output \/dev\/null --silent --head --fail ${DOWNLOAD_LINK}-server.jar; then\r\n echo -e \"Download link is valid.\"\r\n else\r\n echo -e \"Link is invalid closing out\"\r\n exit 2\r\n fi\r\nfi\r\n\r\ncurl -s -o server.jar -sS ${DOWNLOAD_LINK}\r\n\r\n#Checking if downloaded jars exist\r\nif [ ! -f .\/server.jar ]; then\r\n echo \"!!! Error downloading build version ${BUILD_VERSION} !!!\"\r\n exit\r\nfi",
|
||||
"container": "debian:buster-slim",
|
||||
"entrypoint": "bash"
|
||||
}
|
||||
@ -29,7 +29,7 @@
|
||||
"description": "The name of the jarfile to run the server with.",
|
||||
"env_variable": "SERVER_JARFILE",
|
||||
"default_value": "server.jar",
|
||||
"user_viewable": true,
|
||||
"user_viewable": false,
|
||||
"user_editable": false,
|
||||
"rules": "required|string|max:20"
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user