mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2024-11-26 02:57:04 +00:00
b05af6eecb
ownCloud 8.1.1 trusted_domains autoconfiguration fix. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAABAgAGBQJV43ODAAoJELkgQfTBC92BAMEH/3DbsticgFhbPzMsCcmcjxkg 1Dxw4e8YRgMPp3xuq4/5we6bL/KXSxioFc1488jfiLhAe6fHZGmSi4p6L8twnsxD exUd/pHZ8L1SC953JhBXLUWYfAQ/ozEZ8bNPVJ4NLx5T58FPWBSRouQHHZTMc/z1 Pduc6RjZQ3o1dmTzbwt5hB/ZS61CFV2V9cr+aKmFSDKh7/qzBSaqGfiTOsWI43GE JfCN6hwnCUvvkGfaYmxJSY/emgiJETLkQCv0e1kZs5MfojkFUspqvmTQViE2HI4f y5FWmPXvhoHuMIgH0q0Rrw0xchXW44fJbK4SnT50z7do8F7KmSX6ztw5oxux/U0= =kcFy -----END PGP SIGNATURE----- v0.13b - release & merge side-branch ownCloud 8.1.1 trusted_domains autoconfiguration fix.
55 lines
1.2 KiB
Bash
55 lines
1.2 KiB
Bash
#!/bin/bash
|
|
#########################################################
|
|
# This script is intended to be run like this:
|
|
#
|
|
# curl https://.../bootstrap.sh | sudo bash
|
|
#
|
|
#########################################################
|
|
|
|
if [ -z "$TAG" ]; then
|
|
TAG=v0.13b
|
|
fi
|
|
|
|
# Are we running as root?
|
|
if [[ $EUID -ne 0 ]]; then
|
|
echo "This script must be run as root. Did you leave out sudo?"
|
|
exit
|
|
fi
|
|
|
|
# Clone the Mail-in-a-Box repository if it doesn't exist.
|
|
if [ ! -d $HOME/mailinabox ]; then
|
|
if [ ! -f /usr/bin/git ]; then
|
|
echo Installing git . . .
|
|
apt-get -q -q update
|
|
DEBIAN_FRONTEND=noninteractive apt-get -q -q install -y git < /dev/null
|
|
echo
|
|
fi
|
|
|
|
echo Downloading Mail-in-a-Box $TAG. . .
|
|
git clone \
|
|
-b $TAG --depth 1 \
|
|
https://github.com/mail-in-a-box/mailinabox \
|
|
$HOME/mailinabox \
|
|
< /dev/null 2> /dev/null
|
|
|
|
echo
|
|
fi
|
|
|
|
# Change directory to it.
|
|
cd $HOME/mailinabox
|
|
|
|
# Update it.
|
|
if [ "$TAG" != `git describe` ]; 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
|
|
fi
|
|
echo
|
|
fi
|
|
|
|
# Start setup script.
|
|
setup/start.sh
|
|
|