@@ -21,6 +21,16 @@ curl --silent \
2121 sed -E ' s/.*"([^"]+)".*/\1/'
2222}
2323
24+ # Get the latest and penultimate version of the pterodactyl #
25+ get_branch () {
26+ curl --silent \
27+ -H " Accept: application/vnd.github.v3+json" \
28+ https://api.github.com/repos/pterodactyl/panel/releases |
29+ grep ' "tag_name":' |
30+ sed -E ' s/.*"([^"]+)".*/\1/' |
31+ sed " s/[v]//g"
32+ }
33+
2434GITHUB_STATUS_URL=" https://www.githubstatus.com"
2535SCRIPT_VERSION=" $( get_release) "
2636
@@ -121,11 +131,15 @@ bash <(curl -s https://raw.githubusercontent.com/Ferks-FK/Pterodactyl-AutoThemes
121131
122132
123133while [ " $done " == false ]; do
134+ CREATE_ARRAY=$' \n ' read -d " \034" -r -a array <<< " $(get_branch)\034" # https://unix.stackexchange.com/a/628543
135+ LATEST_VERSION=" ${array[0]} "
136+ PENULTIMATE_VERSION=" ${array[1]} "
137+
124138 options=(
125139 " Restore Panel Backup (Only if you have an installation problem.)"
126- " Install Dracula (Only 1.6.6 and 1.7.0 )"
127- " Install Enola (Only 1.6.6 and 1.7.0 )"
128- " Install Twilight (Only 1.6.6 and 1.7.0 )"
140+ " Install Dracula (Only $PENULTIMATE_VERSION and $LATEST_VERSION )"
141+ " Install Enola (Only $PENULTIMATE_VERSION and $LATEST_VERSION )"
142+ " Install Twilight (Only $PENULTIMATE_VERSION and $LATEST_VERSION )"
129143 " Install Zing Theme (Only 1.6.6 and 1.7.0)"
130144 " Install Flanco Theme (Only 1.6.6 and 1.7.0)"
131145 " Install Background Video (Only 1.6.6 and 1.7.0)"
0 commit comments