[Gnu-arch-users] Re: designing how to kill pristine trees

From:

Miles Bader

Subject:

[Gnu-arch-users] Re: designing how to kill pristine trees

Date:

07 Oct 2003 18:04:39 +0900

BTW, I thought of a different algorithm, which I might like better:
just search upwards from the project tree until you find a
`.arch-pristines' and/or `.arch-revlib' dir, and use those, otherwise
use a default.
Here's a script to implement it:
#!/bin/sh
# Construct a tla revision library path.
# CWD should be in the tree tla wants to operate on.
# The returned path is separated by `:'; the first entry is considered
# special in that it is used for automatically cached revisions.
# Default
REVLIB_PATH="/usr/local/arch-pristines:/usr/local/arch-revlib"
# Find sibling root
while :; do
DIR="`pwd`"
test "$DIR" = / && break
if test -z "$PRISTINES" -a -d "$DIR/.arch-pristines"; then
PRISTINES="$DIR/.arch-pristines"
fi
if test -z "$REVLIB" -a -d "$DIR/.arch-revlib"; then
REVLIB="$DIR/.arch-revlib"
fi
cd ..
done
test -z "$REVLIB" || REVLIB_PATH="$REVLIB:$REVLIB_PATH"
test -z "$PRISTINES" || REVLIB_PATH="$PRISTINES:$REVLIB_PATH"
echo "$REVLIB_PATH"
-miles
--
Next to fried food, the South has suffered most from oratory.
-- Walter Hines Page