#!/bin/sh SUDO="" if command -v sudo 2>&1 /dev/null; then SUDO="$(where 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