install_pandoc() { echo "Installing pandoc" local pandoc_maj="3.1.12" local pandoc_min="-1" local pandoc_version=$pandoc_maj$pandoc_min local pandoc_file="pandoc-$pandoc_version-amd64.deb" cd /tmp if [[ ! -f $pandoc_file ]] then wget https://github.com/jgm/pandoc/releases/download/$pandoc_maj/pandoc-$pandoc_version-amd64.deb fi apt install ./$pandoc_file echo "xx installed pandoc version:$pandoc_version" echo "xx check for lastest version in https://github.com/jgm/pandoc/releases" } if [[ $(whereis pandoc) == "" ]] then echo "Can't find pandoc" install_pandoc fi