2016-07-26 23:06:22 -04:00
|
|
|
#!/bin/sh
|
|
|
|
SUDO=""
|
2016-09-09 12:01:04 -04:00
|
|
|
if command -v sudo > /dev/null; then
|
|
|
|
SUDO="$(command -v sudo)"
|
2016-07-26 23:06:22 -04:00
|
|
|
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
|