X-Git-Url: http://git.madism.org/?p=~madcoder%2Fdotfiles.git;a=blobdiff_plain;f=%2Bbin%2Fmadconf;fp=%2Bbin%2Fmadconf;h=cba54fd8651a5f4ef5d1aa939fc464c18e6f8ba5;hp=dfccb81a19a5d5d12a2b1c11e9b8d9fea65ec424;hb=901f0486e49163e44626809ac42a18c6a1dd52bf;hpb=5d1af5e2d843cdca9551fcdd769ebad8075d6750 diff --git a/+bin/madconf b/+bin/madconf index dfccb81..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