19 lines
397 B
Bash
Executable file
19 lines
397 B
Bash
Executable file
#!/bin/bash
|
|
# Simple script for compiling/converting documents with pandoc because I can never remember how to use it
|
|
|
|
# Usage:
|
|
# pandoc-make html *.md
|
|
|
|
|
|
# echo "Convert to... (default: html)"
|
|
# read -r FORMAT
|
|
|
|
FORMAT="${1:-html}"
|
|
FIRST=true
|
|
|
|
for FILE in "$@";do
|
|
[ $FIRST ] && FIRST=false && continue
|
|
if [ -f "$FILE" ]; then
|
|
pandoc -s "$FILE" -o "${FILE%.*}.${FORMAT##.}"
|
|
fi
|
|
done
|