X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=%2Bbin%2Fmadconf;h=cba54fd8651a5f4ef5d1aa939fc464c18e6f8ba5;hb=901f0486e49163e44626809ac42a18c6a1dd52bf;hp=aae2ee263a316ed42af7bbcec86a7bd56f2baff9;hpb=425bf70af8bbf7dd4f55528842a46b68860df170;p=~madcoder%2Fdotfiles.git diff --git a/+bin/madconf b/+bin/madconf index aae2ee2..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 ssh zsh rlwrap ccache; do +for cache in compose mutt ssh gdb zsh rlwrap ccache; do mkdir -p "$HOME/.cache/$cache" done