PKGBUILDs/extra/antiword/antiword-helper
2009-10-09 21:23:22 -05:00

13 lines
206 B
Bash

#!/bin/bash
[ $# -eq 2 ] || exit 1
tmpfile=/tmp/aw$$.txt
editor=${EDITOR:-`which vi`}
terminal="$2"
antiword "$1" > $tmpfile
chmod -w $tmpfile
$terminal -e $editor $tmpfile
chmod +w $tmpfile
rm $tmpfile