dotfiles/.mutt/scripts/call.sh
2024-05-16 22:06:24 +02:00

18 lines
175 B
Bash
Executable File

#/bin/sh
# $1 program
# $2 file
set -ex
prog="$1"
file="$2"
name=${file%.*}
ext=${file##*.}
ln -f "$file" "$name.tmp.$ext"
$prog "$name.tmp.$ext"
rm -f "$name.tmp.$ext"