From c748738bc239c569225cd3ed9a94029f32a27679 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 3 Jan 2017 03:31:38 -0500 Subject: [PATCH] weechat: add scripts/init.sh --- weechat/scripts/init.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 weechat/scripts/init.sh diff --git a/weechat/scripts/init.sh b/weechat/scripts/init.sh new file mode 100755 index 00000000..bf7f37b3 --- /dev/null +++ b/weechat/scripts/init.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +if ! pgrep weechat >/dev/null; then + >&2 echo "Weechat isn't running, or fifo is off: /fifo enable" + exit 1 +fi + +if [[ -f ~/.private/config/irc.conf ]]; then + # ...otherwise, configure it! + CWD=$(cd $(dirname $0) && pwd -P) + + wee "$HOME/.private/config/irc.conf" + wee "$CWD/../plugins.txt" + wee "$CWD/../settings.txt" + wee "$CWD/../servers.txt" +else + >&2 echo "Couldn't find secrets!" + exit 1 +fi