parent
6115305615
commit
4536fd5190
@ -1,11 +1,11 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
export EXAMPLE=$1
|
export EXAMPLE=$1
|
||||||
export EXNAME=`echo ${EXAMPLE} |cut -c 3-`
|
EXNAME=$(echo "${EXAMPLE}" |cut -c 3)
|
||||||
cd examples; \
|
cd examples ||exit; \
|
||||||
install -d dirname ${EXAMPLE}
|
install -d dirname "${EXAMPLE}"
|
||||||
echo "# ${EXNAME}\n\`\`\` c++\n" > ${EXAMPLE}.md
|
printf "# %s\n\`\`\` c++\n", "${EXNAME}" > "${EXAMPLE}.md"
|
||||||
cat ../../examples/${EXAMPLE} >> ${EXAMPLE}.md
|
cat ../../examples/"${EXAMPLE}" >> "${EXAMPLE}.md"
|
||||||
echo "\n\`\`\`" >> ${EXAMPLE}.md
|
printf '\n```' >> "${EXAMPLE}.md"
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in new issue