Skip to content

Commit e683db5

Browse files
committed
Fix AdminNeo download URL and versioning
- Update to AdminNeo 5.1.1 (current stable version) - Fix download URL to use www.adminneo.org/files/ instead of GitHub releases - Project renamed from AdminerNeo to AdminNeo - Download direct PHP file instead of ZIP archive - Simplify file handling (no unzip needed) - Update documentation URLs
1 parent 4dc75dc commit e683db5

File tree

1 file changed

+21
-34
lines changed

1 file changed

+21
-34
lines changed

apps/adminer.sh

Lines changed: 21 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
# T&M Hansson IT AB © - 2024, https://www.hanssonit.se/
44

55
true
6-
SCRIPT_NAME="AdminerNeo"
7-
SCRIPT_EXPLAINER="AdminerNeo is a full-featured database management tool written in PHP.
8-
It's a fork of Adminer, continuing development after AdminerEvo was archived.
9-
More info: https://github.com/adminerneo/adminerneo"
6+
SCRIPT_NAME="AdminNeo"
7+
SCRIPT_EXPLAINER="AdminNeo is a full-featured database management tool written in PHP.
8+
It's a continuation of Adminer development after AdminerEvo was archived.
9+
More info: https://www.adminneo.org"
1010
# shellcheck source=lib.sh
1111
source /var/scripts/fetch_lib.sh
1212

@@ -55,15 +55,15 @@ a2enmod ssl
5555
apt-get update -q4 & spinner_loading
5656
install_if_not adminer
5757

58-
# AdminerEvo project has been archived, switching to AdminerNeo
59-
# See: https://github.com/adminerneo/adminerneo
60-
ADMINER_VERSION="1.0.2"
61-
ADMINER_DOWNLOAD_URL="https://github.com/adminerneo/adminerneo/releases/download/v${ADMINER_VERSION}/adminerneo-${ADMINER_VERSION}-pgsql.zip"
58+
# AdminerEvo project has been archived, switching to AdminNeo (www.adminneo.org)
59+
# See: https://github.com/adminneo-org/adminneo
60+
ADMINER_VERSION="5.1.1"
61+
ADMINER_DOWNLOAD_URL="https://www.adminneo.org/files/${ADMINER_VERSION}/pgsql_en_default/adminneo-${ADMINER_VERSION}.php"
6262

63-
print_text_in_color "$ICyan" "Downloading AdminerNeo version ${ADMINER_VERSION}..."
64-
if ! curl_to_dir "https://github.com/adminerneo/adminerneo/releases/download/v${ADMINER_VERSION}/" "adminerneo-${ADMINER_VERSION}-pgsql.zip" "$ADMINERDIR"
63+
print_text_in_color "$ICyan" "Downloading AdminNeo version ${ADMINER_VERSION}..."
64+
if ! curl_to_dir "https://www.adminneo.org/files/${ADMINER_VERSION}/pgsql_en_default/" "adminneo-${ADMINER_VERSION}.php" "$ADMINERDIR"
6565
then
66-
msg_box "Failed to download AdminerNeo. The download URL may have changed.
66+
msg_box "Failed to download AdminNeo. The download URL may have changed.
6767
6868
Please report this issue to: $ISSUES
6969
@@ -72,33 +72,20 @@ $ADMINER_DOWNLOAD_URL"
7272
exit 1
7373
fi
7474

75-
install_if_not unzip
76-
# Unzip the latest version
77-
if ! unzip -o "$ADMINERDIR"/adminerneo-${ADMINER_VERSION}-pgsql.zip -d "$ADMINERDIR"
75+
# Rename to standard adminer.php name
76+
if [ -f "$ADMINERDIR/adminneo-${ADMINER_VERSION}.php" ]
7877
then
79-
msg_box "Failed to extract AdminerNeo archive. Please report this to $ISSUES"
80-
exit 1
81-
fi
82-
83-
rm -f "$ADMINERDIR"/adminerneo-${ADMINER_VERSION}-pgsql.zip
84-
85-
# AdminerNeo uses different naming convention
86-
if [ -f "$ADMINERDIR"/adminerneo-${ADMINER_VERSION}-pgsql.php ]; then
87-
mv "$ADMINERDIR"/adminerneo-${ADMINER_VERSION}-pgsql.php "$ADMINERDIR"/adminer.php
88-
elif [ -f "$ADMINERDIR"/adminerneo-pgsql.php ]; then
89-
mv "$ADMINERDIR"/adminerneo-pgsql.php "$ADMINERDIR"/adminer.php
78+
mv "$ADMINERDIR/adminneo-${ADMINER_VERSION}.php" "$ADMINERDIR/adminer.php"
79+
elif [ -f "$ADMINERDIR/adminerneo-${ADMINER_VERSION}-pgsql.php" ]
80+
then
81+
# Fallback for old naming if somehow still exists
82+
mv "$ADMINERDIR/adminerneo-${ADMINER_VERSION}-pgsql.php" "$ADMINERDIR/adminer.php"
9083
else
91-
# Fallback: find any .php file and use it
92-
ADMINER_PHP_FILE=$(find "$ADMINERDIR" -maxdepth 1 -name "*.php" -type f | head -1)
93-
if [ -n "$ADMINER_PHP_FILE" ]; then
94-
mv "$ADMINER_PHP_FILE" "$ADMINERDIR"/adminer.php
95-
else
96-
msg_box "Could not find AdminerNeo PHP file after extraction. Please report this to $ISSUES"
97-
exit 1
98-
fi
84+
msg_box "Failed to find downloaded AdminNeo file. Please report this to $ISSUES"
85+
exit 1
9986
fi
10087

101-
print_text_in_color "$IGreen" "AdminerNeo ${ADMINER_VERSION} successfully downloaded and extracted!"
88+
print_text_in_color "$IGreen" "AdminNeo ${ADMINER_VERSION} successfully downloaded!"
10289

10390
# Only add TLS 1.3 on Ubuntu later than 22.04
10491
if version 22.04 "$DISTRO" 24.04.10

0 commit comments

Comments
 (0)