summaryrefslogtreecommitdiffstats
path: root/godot.sh
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2011-03-30 01:36:18 +0200
committerAlexander Sulfrian <alexander@sulfrian.net>2011-03-30 01:43:48 +0200
commitf34a3a2e9eb75a97fc0e204f8edcedee4bbabb46 (patch)
treeb4755c50e360d54b5a1d0e724b96ec08d1506595 /godot.sh
parente29d9f63c9487e6849af911c479661c494066326 (diff)
downloaddotfiles-f34a3a2e9eb75a97fc0e204f8edcedee4bbabb46.tar.gz
dotfiles-f34a3a2e9eb75a97fc0e204f8edcedee4bbabb46.tar.xz
dotfiles-f34a3a2e9eb75a97fc0e204f8edcedee4bbabb46.zip
OpenBSD fixes
Diffstat (limited to 'godot.sh')
-rwxr-xr-xgodot.sh12
1 files 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