nixos/doc/md-to-db.sh: handle path to nixpkgs with spaces

Without this change, the script will fail if the path to nixpkgs contains a space.

Luflosi 7938ea67 ccc287f6

Changed files
+3 -3
nixos
doc
manual
+3 -3
nixos/doc/manual/md-to-db.sh
···
# into DocBook files in the from_md folder.
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
-
pushd $DIR
+
pushd "$DIR"
# NOTE: Keep in sync with Nixpkgs manual (/doc/Makefile).
# TODO: Remove raw-attribute when we can get rid of DocBook altogether.
···
for mf in ${MD_FILES[*]}; do
if [ "${mf: -11}" == ".section.md" ]; then
-
mkdir -p $(dirname "$OUT/$mf")
+
mkdir -p "$(dirname "$OUT/$mf")"
OUTFILE="$OUT/${mf%".section.md"}.section.xml"
pandoc "$mf" "${pandoc_flags[@]}" \
-o "$OUTFILE"
···
fi
if [ "${mf: -11}" == ".chapter.md" ]; then
-
mkdir -p $(dirname "$OUT/$mf")
+
mkdir -p "$(dirname "$OUT/$mf")"
OUTFILE="$OUT/${mf%".chapter.md"}.chapter.xml"
pandoc "$mf" "${pandoc_flags[@]}" \
--top-level-division=chapter \