From a58975246d8f781dfc4644f883d5c4b6d2b39775 Mon Sep 17 00:00:00 2001 From: CDE <73063460+CDE90@users.noreply.github.com> Date: Tue, 19 Apr 2022 13:33:12 +0000 Subject: [PATCH] Update installation script container --- bots/discord/discord.rs/egg-discord-rs-generic.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bots/discord/discord.rs/egg-discord-rs-generic.json b/bots/discord/discord.rs/egg-discord-rs-generic.json index c16f8195..2457cfa5 100644 --- a/bots/discord/discord.rs/egg-discord-rs-generic.json +++ b/bots/discord/discord.rs/egg-discord-rs-generic.json @@ -26,7 +26,7 @@ "scripts": { "installation": { "script": "#!\/bin\/bash\r\n# Rust Bot Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\napt update\r\napt install -y git\r\n\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\n## add git ending if it's not on the address\r\nif [[ ${GIT_ADDRESS} != *.git ]]; then\r\n GIT_ADDRESS=${GIT_ADDRESS}.git\r\nfi\r\n\r\nif [ -z \"${USERNAME}\" ] && [ -z \"${ACCESS_TOKEN}\" ]; then\r\n echo -e \"using anon api call\"\r\nelse\r\n GIT_ADDRESS=\"https:\/\/${USERNAME}:${ACCESS_TOKEN}@$(echo -e ${GIT_ADDRESS} | cut -d\/ -f3-)\"\r\nfi\r\n\r\n## pull git js bot repo\r\nif [ \"$(ls -A \/mnt\/server)\" ]; then\r\n echo -e \"\/mnt\/server directory is not empty.\"\r\n if [ -d .git ]; then\r\n echo -e \".git directory exists\"\r\n if [ -f .git\/config ]; then\r\n echo -e \"loading info from git config\"\r\n ORIGIN=$(git config --get remote.origin.url)\r\n else\r\n echo -e \"files found with no git config\"\r\n echo -e \"closing out without touching things to not break anything\"\r\n exit 10\r\n fi\r\n fi\r\n\r\n if [ \"${ORIGIN}\" == \"${GIT_ADDRESS}\" ]; then\r\n echo \"pulling latest from github\"\r\n git pull\r\n fi\r\nelse\r\n echo -e \"\/mnt\/server is empty.\\ncloning files into repo\"\r\n if [ -z ${BRANCH} ]; then\r\n echo -e \"cloning default branch\"\r\n git clone ${GIT_ADDRESS} .\r\n else\r\n echo -e \"cloning ${BRANCH}'\"\r\n git clone --single-branch --branch ${BRANCH} ${GIT_ADDRESS} .\r\n fi\r\n\r\nfi\r\n\r\nexport HOME=\/mnt\/server\r\n\r\necho -e \"install complete\"\r\nexit 0", - "container": "rust:1.60.0-slim", + "container": "debian:buster-slim", "entrypoint": "bash" } },