Welcome to little lamb

Code » comain » commit a4dcc0a

mkdoc: Add symlink support

author Olivier Brunel
2023-05-20 12:37:00 UTC
committer Olivier Brunel
2023-06-20 07:07:15 UTC
parent 5d10509323ca9f855b6975d5e0542242aefb4c6c

mkdoc: Add symlink support

mkdoc +4 -0

diff --git a/mkdoc b/mkdoc
index 21f11aa..ecfe89c 100755
--- a/mkdoc
+++ b/mkdoc
@@ -3,6 +3,10 @@
 dst="$1"
 src="src/$(expr substr "$dst" 7 ${#dst})"
 
+if test -L "$src"; then
+    exec cp -a "$src" "$dst"
+fi
+
 awk 'BEGIN { FS="[ >]" }
 { if ($0 ~ /^<inc (.+)>$/) { system("test -e src/doc/include/"$2" \
     && cat src/doc/include/"$2" || cat comain/src/doc/include/"$2) }