diff options
Diffstat (limited to 'godot.sh')
-rwxr-xr-x | godot.sh | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -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 |