git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #141121 from Luflosi/md-to-db.sh-handle-path-with-spaces

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

commit1512ec8656e77eb5931f7bb5ee0a31681f037e95 authorfigsoda <figsoda@pm.me> dateSun 10 Oct 2021, 11:24 (5 years ago) parent88045f07938ea6
1 file changed+3−3
nixos/doc/manual/md-to-db.sh+3−3
nixos/doc/manual/md-to-db.sh+3−3
@@ -6,7 +6,7 @@
66# into DocBook files in the from_md folder.
77
88DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
9−pushd $DIR
9+pushd "$DIR"
1010
1111# NOTE: Keep in sync with Nixpkgs manual (/doc/Makefile).
1212# TODO: Remove raw-attribute when we can get rid of DocBook altogether.
@@ -29,7 +29,7 @@ mapfile -t MD_FILES < <(find . -type f -regex '.*\.md$')
2929
3030for mf in ${MD_FILES[*]}; do
3131 if [ "${mf: -11}" == ".section.md" ]; then
32− mkdir -p $(dirname "$OUT/$mf")
32+ mkdir -p "$(dirname "$OUT/$mf")"
3333 OUTFILE="$OUT/${mf%".section.md"}.section.xml"
3434 pandoc "$mf" "${pandoc_flags[@]}" \
3535 -o "$OUTFILE"
@@ -37,7 +37,7 @@ for mf in ${MD_FILES[*]}; do
3737 fi
3838
3939 if [ "${mf: -11}" == ".chapter.md" ]; then
40− mkdir -p $(dirname "$OUT/$mf")
40+ mkdir -p "$(dirname "$OUT/$mf")"
4141 OUTFILE="$OUT/${mf%".chapter.md"}.chapter.xml"
4242 pandoc "$mf" "${pandoc_flags[@]}" \
4343 --top-level-division=chapter \