Dotfiles/bin/.bin/conversion/convert-to-pdf
2019-07-30 14:06:10 +01:00

12 строки
226 Б
Bash
Исполняемый файл

#!/usr/bin/env sh
file=$(readlink -f "$1")
dir=$(dirname "$file")
base="${file%.*}"
cd "$dir" || exit
case "$file" in
*\.doc|*\.docx) libreoffice --convert-to pdf "$file" ;;
*) echo "Don't know how to convert $file"
esac