power-mailinabox/setup/bootstrap.sh

33 lines
790 B
Bash
Raw Normal View History

#!/bin/bash
#########################################################
# This script is intended to be run like this:
#
2020-04-20 22:31:18 +00:00
# curl https://dvn.pt/power-miab | sudo bash
#
#########################################################
if [ -z "$TAG" ]; then
2020-05-17 01:33:26 +00:00
OS=`lsb_release -d | sed 's/.*:\s*//'`
2020-07-25 23:26:35 +00:00
if [ "$OS" == "Debian GNU/Linux 10 (buster)" -o "$(echo $OS | grep -o 'Ubuntu 20.04')" == "Ubuntu 20.04" ]; then
2021-05-16 20:41:37 +00:00
TAG=v0.53.POWER.1
else
fi
# Change directory to it.
cd $HOME/mailinabox
# Update it.
if [ "$TAG" != "`git describe --tags`" ]; then
echo Updating Mail-in-a-Box to $TAG . . .
git fetch --depth 1 --force --prune origin tag $TAG
if ! git checkout -q $TAG; then
echo "Update failed. Did you modify something in `pwd`?"
exit 1
fi
echo
fi
# Start setup script.
setup/start.sh
2014-09-21 20:37:04 +00:00