From c163b426eebf6d662efc9468b3a436c4dcb0291e Mon Sep 17 00:00:00 2001 From: Austen Date: Sun, 22 Jun 2014 23:14:05 -0400 Subject: [PATCH 1/2] Changed vim editor to vi editor for computers without Vim. Added -h (help) flag in sync.sh. Ran :%s/\n/sudo \r/g in wemux.conf for root access --- sync.sh | 11 ++++++++++- wemux.sh | 8 ++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/sync.sh b/sync.sh index 2b0f5f1..ece40ea 100755 --- a/sync.sh +++ b/sync.sh @@ -1,4 +1,13 @@ -while getopts ":bsdtc" VALUE "$@"; do +while getopts ":hbsdtc" VALUE "$@"; do + if [ "$VALUE" = "h" ] ; then + echo "sync.sh syncs configuration files, applications, and Vim bundles between computers" + echo " -h Shows this help" + echo " -b Syncs Vim bundles" + echo " -s Syncs computer with server applications in server.txt" + echo " -d Syncs computer with desktop applications in desktop.txt" + echo " -t Syncs tmux configuration file" + echo " -c Syncs other configuration files" + fi if [ "$VALUE" = "b" ] ; then mkdir -p ~/.vim/plugin/ mkdir -p ~/.vim/backup/ diff --git a/wemux.sh b/wemux.sh index 15018b2..1a41535 100755 --- a/wemux.sh +++ b/wemux.sh @@ -1,4 +1,4 @@ -git clone git://github.com/zolrath/wemux.git /usr/local/share/wemux -ln -s /usr/local/share/wemux/wemux /usr/local/bin/wemux -cp /usr/local/share/wemux/wemux.conf.example /usr/local/etc/wemux.conf -vim /usr/local/etc/wemux.conf +:13 +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 From c8dade27e80a1a6495b4451cf1bdeb48dfdb4688 Mon Sep 17 00:00:00 2001 From: Austen Date: Mon, 23 Jun 2014 00:09:29 -0400 Subject: [PATCH 2/2] Removed sudo apt-get update;sudo apt-get upgrade from -d and -s flags --- sync.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sync.sh b/sync.sh index ece40ea..6376c51 100755 --- a/sync.sh +++ b/sync.sh @@ -31,12 +31,12 @@ while getopts ":hbsdtc" VALUE "$@"; do if [ "$VALUE" = "s" ] ; then echo "Installing server applications:" echo $(grep -vE "^\s*#" server.txt | tr "\n" " ") - sudo apt-get update;sudo apt-get upgrade;sudo apt-get install $(grep -vE "^\s*#" server.txt | tr "\n" " ") + sudo apt-get install $(grep -vE "^\s*#" server.txt | tr "\n" " ") fi if [ "$VALUE" = "d" ] ; then echo "Installing desktop applications" echo $(grep -vE "^\s*#" desktop.txt | tr "\n" " ") - sudo apt-get update;sudo apt-get upgrade;sudo apt-get install $(grep -vE "^\s*#" desktop.txt | tr "\n" " ") + sudo apt-get install $(grep -vE "^\s*#" desktop.txt | tr "\n" " ") fi if [ "$VALUE" = "t" ] ; then echo "Syncing tmux"