You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Kaleidoscope/bin/docs/example-to-doc

12 lines
274 B

#!/bin/sh
export EXAMPLE="$1"
EXNAME=$(echo "${EXAMPLE}" |cut -c 3-)
cd examples ||exit; \
install -d dirname "${EXAMPLE}"
printf "# %s\n\`\`\` c++\n", "${EXNAME}" > "${EXAMPLE}.md"
cat ../../examples/"${EXAMPLE}" >> "${EXAMPLE}.md"
printf "\n\`\`\`" >> "${EXAMPLE}.md"