diff options
| author | Anton Bobov <abobov@gmail.com> | 2011-10-14 15:57:10 +0600 |
|---|---|---|
| committer | Anton Bobov <abobov@gmail.com> | 2011-10-14 15:57:10 +0600 |
| commit | fbfc253991663ef7f32f4f704047d5b94c9ddc38 (patch) | |
| tree | 1fcda135b1b9097550792ae36e2a8bb73e4df1da /clone_and_link.sh | |
| parent | c81902f0a9286e794c8cbca8aef40d10d3304a85 (diff) | |
f
Diffstat (limited to 'clone_and_link.sh')
| -rwxr-xr-x | clone_and_link.sh | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/clone_and_link.sh b/clone_and_link.sh deleted file mode 100755 index 94b09fa..0000000 --- a/clone_and_link.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - -# Based on file from https://github.com/benhoskings/dot-files - -set -e -dir=dot-files/files - -os=$(uname -o) - -create_windows_link() -{ - target=$target/$(basename "$link") - rm -rvf "$target" - if [ -d "$link" ] ; then - cmd /c mklink /D $(cygpath -w "$target") $(cygpath -w "$link") - else - cmd /c mklink $(cygpath -w "$target") $(cygpath -w "$link") - fi -} - -create_link() -{ - local link=$1 - local target=$2 - case "$os" in - "Cygwin") create_windows_link ;; - *) ln --verbose --symbolic --force "$link" "$target" ;; - esac -} - -cd && -ls --format=single-column --directory $dir/{,.}* | while read f ; do - [ "$f" == "$dir/." ] || - [ "$f" == "$dir/.." ] || - create_link "$f" . -done |
