12 lines
		
	
	
	
		
			226 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable file
		
	
	
	
	
			
		
		
	
	
			12 lines
		
	
	
	
		
			226 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable file
		
	
	
	
	
#!/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
 |