Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100755 26 lines (20 sloc) 0.633 kB
e58e854 @mislav rewrite install script in bash
authored
1 #!/usr/bin/env bash
2 set -e
3
5c59818 @mislav symlink bins from other people's dotfiles
authored
4 here="$(cd "${0%/*}"; pwd)"
e58e854 @mislav rewrite install script in bash
authored
5
6 for file in "$here"/*; do
7 name="$(basename "$file" .md)"
8 [[ $name = bin ]] && dotname="$name" || dotname=".${name}"
9
4fd0db9 @mislav keep iTerm2 preferences
authored
10 if ! [[ "install readme" =~ $name || $name =~ ".plist" || -e ~/$dotname || -d $file/.git ]]; then
a15e10b @tclh123 LN should use `-n` instead of `-h` option
tclh123 authored
11 ln -sfnv ${file#$HOME/} "${HOME}/${dotname}"
e58e854 @mislav rewrite install script in bash
authored
12 fi
13 done
5c59818 @mislav symlink bins from other people's dotfiles
authored
14
15 while read file; do
16 bin="bin/${file##*/}"
17 fullbin="${here}/${bin}"
18
19 if ! [[ -e "${here}/${file}" ]]; then
20 echo "not found: ${file}" >&2
21 elif ! [[ -e $fullbin ]]; then
a15e10b @tclh123 LN should use `-n` instead of `-h` option
tclh123 authored
22 ln -sfnv "../${file}" "$fullbin"
5c59818 @mislav symlink bins from other people's dotfiles
authored
23 echo "$bin" >> "${here}/.git/info/exclude"
24 fi
25 done < "${here}/.external"
Something went wrong with that request. Please try again.