docs: Small fixes and ordering
[vpp.git] / docs / scripts / prepare-for-site.sh
diff --git a/docs/scripts/prepare-for-site.sh b/docs/scripts/prepare-for-site.sh
new file mode 100755 (executable)
index 0000000..15888ba
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+if [ ! -d "docs" ]; then
+  echo "This script is meant to be run from the root directory"
+  exit 1;
+fi
+
+for f in $(find ./docs -type l)
+do
+  target=$(readlink $f)
+  rm $f
+  cp $(dirname $f)/$target $(dirname $f)/$(basename $target)
+  echo "Replaced symlink $f"
+done
+
+echo "Cleaning doc build directory"
+make docs-clean
+