apt-erlang: Only attempt to remove /usr/lib/erlang/man symlink if it exists
Signed-off-by: Lee Jones <lee.jones@linaro.org>
diff --git a/bin/apt-erlang.sh b/bin/apt-erlang.sh
index aa1599a..23651da 100755
--- a/bin/apt-erlang.sh
+++ b/bin/apt-erlang.sh
@@ -59,7 +59,9 @@
# dangling symlinks cause make release to fail.
# so, we remove the manpage symlink
# see endless complaints about this on GH issues, SO, etc.
-rm /usr/lib/erlang/man
+if [[ -h /usr/lib/erlang/man ]]; then
+ rm /usr/lib/erlang/man
+fi
# clean up
apt-get clean