diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2011-03-30 01:36:18 +0200 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2011-03-30 01:43:48 +0200 |
commit | f34a3a2e9eb75a97fc0e204f8edcedee4bbabb46 (patch) | |
tree | b4755c50e360d54b5a1d0e724b96ec08d1506595 | |
parent | e29d9f63c9487e6849af911c479661c494066326 (diff) | |
download | dotfiles-f34a3a2e9eb75a97fc0e204f8edcedee4bbabb46.tar.gz dotfiles-f34a3a2e9eb75a97fc0e204f8edcedee4bbabb46.tar.xz dotfiles-f34a3a2e9eb75a97fc0e204f8edcedee4bbabb46.zip |
OpenBSD fixes
Diffstat (limited to '')
-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 |