From 46a7ff042a63189bf3896cd81d7362430cd1fe6a Mon Sep 17 00:00:00 2001 From: Austen Date: Mon, 7 Jul 2014 15:43:52 -0400 Subject: [PATCH] Added -w flag to sync from wemux. Wemux script now automatically executes tmux -2 instead of just tmux now. --- sync.sh | 9 ++++++++- wemux.sh | 4 ---- 2 files changed, 8 insertions(+), 5 deletions(-) delete mode 100755 wemux.sh diff --git a/sync.sh b/sync.sh index 2deb76e..d5a50f5 100755 --- a/sync.sh +++ b/sync.sh @@ -1,4 +1,4 @@ -while getopts ":hbsdtcl" VALUE "$@"; do +while getopts ":hbsdtclw" VALUE "$@"; do if [ "$VALUE" = "h" ] ; then echo "sync.sh syncs configuration files, applications, and Vim bundles between computers" echo " -h Shows this help" @@ -76,5 +76,12 @@ while getopts ":hbsdtcl" VALUE "$@"; do ln -s ~/Videos ~/videos echo "Done" fi + if [ "$VALUE" = "w" ] ; then + sudo git clone git://github.com/zolrath/wemux.git /usr/local/share/wemux + sudo ln -s /usr/local/share/wemux/wemux /usr/local/bin/wemux + sudo cp /usr/local/share/wemux/wemux.conf.example /usr/local/etc/wemux.conf + sudo vi `which wemux` +"execute \"normal gg/tmux\nnnea -2\nea -2\ggZZ\"" +sudo vi /usr/local/etc/wemux.conf +":execute \"normal gg/host_list\nnww\"" + fi done echo "Done syncing" diff --git a/wemux.sh b/wemux.sh deleted file mode 100755 index 1a41535..0000000 --- a/wemux.sh +++ /dev/null @@ -1,4 +0,0 @@ -sudo git clone git://github.com/zolrath/wemux.git /usr/local/share/wemux -sudo ln -s /usr/local/share/wemux/wemux /usr/local/bin/wemux -sudo cp /usr/local/share/wemux/wemux.conf.example /usr/local/etc/wemux.conf -sudo vi /usr/local/etc/wemux.conf +:13