#! /bin/sh # # Sort the current database to put the "to be confirmed" stuff # at the beginning, with both it and the not-to-be-confirmed stuff # sorted by transaction date. # PATH=/home/mouse/acc/bin:"$PATH" edprog=${EDITOR:-vi} db="`conf -p db`" sslock "$db" $$ || exit $? cp "$db" "$db".bak || exit $? trap 'mv "$db".bak "$db"; exit 1' 1 2 15 confirm-sort "$@" < "$db".bak > "$db" ec=$? case $ec in 0) ;; *) ssunlock "$db" exit $ec ;; esac echo Sorted. $edprog "$db" echo Done. ssunlock "$db"