X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=%2Bbin%2Fmadconf;h=cba54fd8651a5f4ef5d1aa939fc464c18e6f8ba5;hb=b432593cd0e91f2b0eb9bba5d106b563cd98e916;hp=1e35d64fbd0f8097bb11c51bb0400bdfa2b66ad4;hpb=5923f706617b966f114656c78bd60108d4ab1dde;p=~madcoder%2Fdotfiles.git diff --git a/+bin/madconf b/+bin/madconf index 1e35d64..cba54fd 100755 --- a/+bin/madconf +++ b/+bin/madconf @@ -1,10 +1,12 @@ #!/bin/bash +. "$(dirname "$0")/setup.sh" + dotfiles="$(dirname "$(dirname "$(readlink -f "$0")")")" dot_ln() { - rel="$(echo "${1#$dotfiles/}" | sed -e 's~[^/]\+~..~g')/" - ln -s "${rel#../}${1#$HOME/}" "$HOME/$2" + rel="$(echo "${1#$dotfiles/}" | sed -e 's~[^/][^/]*~..~g')/" + ln -sf "${rel#../}${1#$HOME/}" "$HOME/$2" } find $dotfiles -mindepth 1 -type d \( -name '[+.]*' -prune -o -print \) | while read d; do @@ -21,6 +23,6 @@ find $dotfiles -mindepth 1 \( -name '[+.]*' -prune -o -not -type d -print \) | w dot_ln "$f" ".${f#$dotfiles/}" done -for cache in zsh rlwrap ccache; do +for cache in compose mutt ssh gdb zsh rlwrap ccache; do mkdir -p "$HOME/.cache/$cache" done