beautifies the install script
authorMart Lubbers <mart@martlubbers.net>
Mon, 10 Mar 2014 22:09:51 +0000 (23:09 +0100)
committerMart Lubbers <mart@martlubbers.net>
Mon, 10 Mar 2014 22:09:51 +0000 (23:09 +0100)
install

diff --git a/install b/install
index 5423b0c..6d4d4bc 100755 (executable)
--- a/install
+++ b/install
@@ -1,11 +1,16 @@
 #!/bin/bash
-cp -if `pwd`/.vimrc ~/.vimrc
-cp -if `pwd`/.bashrc ~/.bashrc
-cp -if `pwd`/.Xresources ~/.Xresources
-cp -if `pwd`/muttrc ~/.mutt/muttrc
-cp -if `pwd`/msmtp ~/.mutt/msmtp
-cp -if `pwd`/offlineimaprc ~/.mutt/offlineimaprc
 
-mkdir -p ~/.i3
-cp -if `pwd`/i3/* ~/.i3/
-cp -if `pwd`/.xinitrc ~/.xinitrc
+cp -if `pwd`/.vimrc ~/.vimrc || true
+cp -if `pwd`/.bashrc ~/.bashrc || true
+cp -if `pwd`/muttrc ~/.mutt/muttrc || true
+cp -if `pwd`/msmtp ~/.mutt/msmtp || true
+cp -if `pwd`/offlineimaprc ~/.mutt/offlineimaprc || true
+
+if [ "$1" = "-x" ]
+then
+       echo 'Also copying X files for non headless'
+       mkdir -p ~/.i3
+       cp -if `pwd`/i3/* ~/.i3/ || true
+       cp -if `pwd`/.xinitrc ~/.xinitrc || true
+       cp -if `pwd`/.Xresources ~/.Xresources || true
+fi