#!/bin/sh tmpfile=$(mktemp ~/.jbgtojbg.XXXXXX) || exit 1 jbgtopbm "$1" | pbmtojbg -q >$tmpfile mv -f $tmpfile "$1" && chmod go+r "$1" .