[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnu-arch-users] Re: give us a hand with arch
From: |
Colin Walters |
Subject: |
Re: [Gnu-arch-users] Re: give us a hand with arch |
Date: |
Fri, 26 Sep 2003 18:47:21 -0400 |
On Fri, 2003-09-26 at 16:24, Tom Lord wrote:
> I don't understand why you don't create a shell alias or tiny script
> on your path.
It's not *entirely* trivial. Here's the implementation of "commit" from
my wrapper script (which is available from
Archive: address@hidden
Revision: misc-scripts--mainline--1.0
Location: http://arch.verbum.org/arch-home
)
tla_fn_commit () {
log_specified=
args=""
for arg in "$@"; do
case "$arg" in
-s*|--summary|-l|--log|-L|--log-message) log_specified=yes;;
*) ;;
esac
done
if test "$log_specified"; then
realtla "$cmd" "$@"
fi
logs=$(echo "$patchlog_prefix"*)
cnt=$(echo $logs | wc -w)
if test "$cnt" -lt 1 || (test "$cnt" -eq 1 && ! test -f "$logs");
then
if test "$autoedit_nolog" = yes; then
echo "No logs found, creating one automatically." 1>&2
echo "(Use \"tla make-log\" to create a log file.)" 1>&2
logs=$(cmd="make-log" tla_fn_make_log)
md5log="$logs".md5."$tmp_suffix"
md5sum "$logs" > "$md5log"
editor "$logs"
if md5sum -c "$md5log" 1>/dev/null 2>&1; then
echo "Log unchanged, not committing!"
rm -f "$logs"
rm -f *".md5.$tmp_suffix"
exit 1
fi
rm -f *".md5.$tmp_suffix"
# Fall through to exec below
else
realtla "$cmd" "$@"
fi
else
if test $(echo $logs | wc -w) -gt 1; then
echo "Multiple logs found; you must specify --log"
exit 1
fi
fi
if test $(tla tagging-method) != 'explicit'; then
# disgusting hack
mv "$logs" "++$logs"
logs="++$logs"
fi
realtla "$cmd" --log "$logs" "$@"
}
- [Gnu-arch-users] Re: give us a hand with arch, (continued)
- [Gnu-arch-users] Re: give us a hand with arch, Dustin Sallings, 2003/09/26
- Re: [Gnu-arch-users] Re: give us a hand with arch, MJ Ray, 2003/09/26
- Re: [Gnu-arch-users] Re: give us a hand with arch, Dustin Sallings, 2003/09/26
- Re: [Gnu-arch-users] Re: give us a hand with arch, MJ Ray, 2003/09/26
- Re: [Gnu-arch-users] Re: give us a hand with arch, Dustin Sallings, 2003/09/26
- Re: [Gnu-arch-users] Re: give us a hand with arch, Tom Lord, 2003/09/26
- Re: [Gnu-arch-users] Re: give us a hand with arch, Dustin Sallings, 2003/09/26
- Re: [Gnu-arch-users] Re: give us a hand with arch, Sascha Silbe, 2003/09/26
- Re: [Gnu-arch-users] Re: give us a hand with arch, Andrea Arcangeli, 2003/09/26
- Re: [Gnu-arch-users] Re: give us a hand with arch, Stephen J. Turnbull, 2003/09/27
- Re: [Gnu-arch-users] Re: give us a hand with arch,
Colin Walters <=
- Re: [Gnu-arch-users] Re: give us a hand with arch, Tom Lord, 2003/09/26
- Re: [Gnu-arch-users] Re: give us a hand with arch, Andrea Arcangeli, 2003/09/26
- Re: [Gnu-arch-users] Re: give us a hand with arch, Stephen J. Turnbull, 2003/09/27
- Re: [Gnu-arch-users] Re: give us a hand with arch, Robin Farine, 2003/09/27
- Re: [Gnu-arch-users] Re: give us a hand with arch, Stephen J. Turnbull, 2003/09/29
- Re: [Gnu-arch-users] Re: give us a hand with arch, Tom Lord, 2003/09/27
- Re: [Gnu-arch-users] Re: give us a hand with arch, Mark A. Flacy, 2003/09/27
- Re: [Gnu-arch-users] Re: give us a hand with arch, Tom Lord, 2003/09/27
- Re: [Gnu-arch-users] Re: give us a hand with arch, Mark A. Flacy, 2003/09/27
- Re: [Gnu-arch-users] Re: give us a hand with arch, Mark A. Flacy, 2003/09/27