From f34a3a2e9eb75a97fc0e204f8edcedee4bbabb46 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Wed, 30 Mar 2011 01:36:18 +0200 Subject: OpenBSD fixes --- godot.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/godot.sh b/godot.sh index c935442..c335da0 100755 --- a/godot.sh +++ b/godot.sh @@ -15,8 +15,8 @@ fi pushd $HOME >/dev/null # create new symlinks as specified in dotfiles mapping file: -grep -v "^#\|^$" "${TARGET}/symlink-mapping" | \ - grep "[^ ]\+ -> [^ ]\+" | \ +grep -ve "^#" -e "^$" "${TARGET}/symlink-mapping" | \ + grep -E "[^ ]+ -> [^ ]+" | \ awk -F " -> " '{ print $1 ; print "'$TARGET'/"$2; }' | \ while read target ; read source ; do if [[ -e "${target}" && ! -f "${target}" && ! -L "${target}" ]]; then @@ -36,7 +36,13 @@ popd >/dev/null pushd "${HOME}/${TARGET}" >/dev/null # update hash of current symlink mapping -md5sum "symlink-mapping" > "./management/symlinks.md5" +if hash md5sum 2> /dev/null ; then + md5sum "symlink-mapping" > "./management/symlinks.md5" +else + if hash md5 2> /dev/null ; then + md5 "symlink-mapping" > "./management/symlinks.md5" + fi +fi popd >/dev/null -- cgit v1.2.3