myvemail/build/run/bin/upgrade-roundcube

17 lines
500 B
Text
Raw Permalink Normal View History

2024-08-09 12:50:33 +00:00
#!/usr/bin/env bash
# Installer for updating Roundcube
set -e
# Temporary work directory
workdir=$(mktemp -d)
# Download and update
cd ${workdir}
wget -q4 $(wget -q4O- https://api.github.com/repos/roundcube/roundcubemail/releases/latest | grep 'complete.tar.gz"$' | awk '{print $2}' | tr -d '"|,') -O roundcubemail.tar.gz
mkdir ./roundcube
tar zxf roundcubemail.tar.gz -C ./roundcube --strip-components 1
./roundcube/bin/installto.sh /usr/share/webapps/roundcube/
cd
# Cleanup
rm -r ${workdir} -f