Skip to content

Instantly share code, notes, and snippets.

@bf4
Forked from anonymous/build.sh
Created December 27, 2012 17:14
Show Gist options
  • Save bf4/4390017 to your computer and use it in GitHub Desktop.
Save bf4/4390017 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
export PATH="$PATH:/usr/texbin/"
which pandoc &>/dev/null
if [ $? -eq 0 ]
then
if [ ! -n "$1" ]
then
echo 'defaulting to pdf'
file_name='scalingphp.pdf'
else
file_name="scalingphp.$1"
fi
files=$(ls *.md | grep -vi sample | grep -v README | sort | xargs)
pandoc $files -o $file_name
else
echo "you need to install pandoc"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment