From 616bcfcf5d19172ed7cbb6645e6a2bef8af5eba9 Mon Sep 17 00:00:00 2001 From: Poag Date: Fri, 12 Aug 2016 11:48:33 +0100 Subject: [PATCH] Added version variable. Defaults to Prod releases --- init/40_nadekoinstall.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/init/40_nadekoinstall.sh b/init/40_nadekoinstall.sh index 6f2f5a9..ec69cfc 100644 --- a/init/40_nadekoinstall.sh +++ b/init/40_nadekoinstall.sh @@ -3,12 +3,17 @@ #Cleanup Old rm -rf /root/NadekoBot -#Get NadekoBot Latest -curl -s https://api.github.com/repos/Kwoth/NadekoBot/releases | grep browser_download_url | head -n 1 | cut -d '"' -f 4|wget -i - -O /root/NadekoBot.latest.zip &&\ +#Get NadekoBot Version +if [[ "$VERSION" = dev]]; then + curl -s https://api.github.com/repos/Kwoth/NadekoBot/releases | grep browser_download_url | head -n 1 | cut -d '"' -f 4|wget -i - -O /root/NadekoBot.latest.zip &&\ +else + curl -s https://api.github.com/repos/Kwoth/NadekoBot/releases/latest | grep browser_download_url | head -n 1 | cut -d '"' -f 4|wget -i - -O /root/NadekoBot.latest.zip &&\ +fi + unzip /root/NadekoBot.latest.zip -d /root/NadekoBot #Sync any new data files rsync --ignore-existing -r /root/NadekoBot/data /config #Remove data folder -rm -rf /root/NadekoBot/data \ No newline at end of file +rm -rf /root/NadekoBot/data