Last active
January 21, 2021 23:31
-
-
Save paul1522/c57aa5bbd44fab8370b860754c307acd to your computer and use it in GitHub Desktop.
Bash script to download the latest version of adminer from https://www.adminer.org/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## Figure out what the latest version is and download it, if needed. | |
CURVER=`wget -qO- https://www.adminer.org/ | perl -ne 'if (m/adminer-([0-9\.]+)\.php/s) { print "$1\n"; exit }'` | |
[ -f adminer-$CURVER.php ] || wget https://github.com/vrana/adminer/releases/download/v$CURVER/adminer-$CURVER.php | |
## Symlink index.php to it. | |
ln -sf adminer-$CURVER.php index.php | |
## Get the theme switcher too. | |
[ -f adminer-theme-switcher.php ] || wget https://raw.githubusercontent.com/felladrin/adminer-theme-switcher/master/adminer-theme-switcher.php | |
## Install a dark theme, unless a theme is already installed. | |
[ -f adminer.css ] || wget https://raw.githubusercontent.com/vrana/adminer/master/designs/mancave/adminer.css | |
## Prepare to be served. | |
chown www-data.www-data * | |
chmod 770 * |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment