On Thu, Oct 17, 2013 at 8:25 PM, Ron Wilson <ronw.m...@gmail.com> wrote:
> $ cat fci > #! /usr/bin/bash > echo "" > tmp$$.txt > $EDITOR tmp$$.txt > fossil ci -M tmp$$.txt $* > rm tmp$$.txt > If you want to go one further you can protect against ctrl-c leaving a temp file laying around by adding: trap "rm -f tmp$$.txt" 0 somewhere near the top (e.g., right after the first echo "" bit). OTOH, you might want to keep the temp file if the user Ctrl-C's out in an untimeline fashion. > This will create a temporary file using the process number of the running > script, then delete it after the commit is done. > With the trap in place it's removed regardless of how the script exits. -- ----- stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "Since tyranny's the only guaranteed byproduct of those who insist on a perfect world, freedom will have to do." -- Bigby Wolf
_______________________________________________ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users