sync/applications/wemux.sh

14 lines
663 B
Bash
Executable File

#!/bin/sh
SUDO=""
if command -v sudo > /dev/null; then
SUDO="$(command -v sudo)"
fi
echo "Installing wemux..."
test -d /usr/local/share/wemux || $SUDO git clone git://github.com/zolrath/wemux.git /usr/local/share/wemux && $SUDO git --git-dir=/usr/local/share/wemux pull
$SUDO rm -r /usr/local/bin/wemux /usr/local/etc/wemux.conf
$SUDO ln -s /usr/local/share/wemux/wemux /usr/local/bin/wemux
$SUDO mkdir -p /usr/local/etc
$SUDO cp /usr/local/share/wemux/wemux.conf.example /usr/local/etc/wemux.conf
printf 'options="-u2"\n' | $SUDO tee -a /usr/local/etc/wemux.conf >/dev/null
printf "host_list=(root $USER)\n" | $SUDO tee -a /usr/local/etc/wemux.conf >/dev/null