Minor fix for Macintosh OS X.
David Blume

David Blume commited on 2015-11-27 17:22:16
Showing 2 changed files, with 6 additions and 2 deletions.

... ...
@@ -23,9 +23,9 @@ Run the following:
23 23
     dotfiles$ curl -L http://git.dlma.com/dotfiles.git/tarball/master > dotfiles.tar
24 24
     dotfiles$ tar -xvf dotfiles.tar
25 25
     dotfiles$ rm dotfiles.tar
26
-    dotfiles$ chmod +x setup.sh
27 26
 
28
-Then, then you run `setup.sh`, it'll backup your old files to `backup_of_orig_dotfiles_<date>`.
27
+Then, then you run `setup.sh`, it'll backup your old files to `backup_of_orig_dotfiles_<date>`
28
+and replace them with the ones here.
29 29
 
30 30
     dotfiles$ ./setup.sh
31 31
 
... ...
@@ -1,7 +1,11 @@
1 1
 #!/bin/bash
2 2
 set -eu -o pipefail # See: https://sipb.mit.edu/doc/safe-shell/
3 3
 
4
+if [[ $(uname -s) == Darwin* ]]; then
5
+    declare -r backup_dir=$HOME/backup_of_orig_dotfiles_`date "+%Y-%m-%d"`
6
+else
4 7
     declare -r backup_dir=$HOME/backup_of_orig_dotfiles_`date -Idate`
8
+fi
5 9
 
6 10
 if [ ! -d $backup_dir ]; then
7 11
     mkdir -p $backup_dir
8 12