summaryrefslogtreecommitdiff
path: root/community/antiword/antiword-helper
blob: ee9fea6279e341d2e317143dbd8604aec5dbc459 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/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