5 if [ -z "$CONFIG" ]; then
6 echo "Usage: $0 CONFIG" >&2
15 for line in $(baz cat-config "$1" 2>/dev/null || cat "$1"); do
21 echo "Updating $DIR ($VERSION) ..."
24 bzr+ssh://*|http://*|sftp://*)
25 if [ -d "$DIR" ]; then
26 if [ ! -d "$DIR/.bzr" ]; then
27 echo "$DIR is not a bzr checkout; cannot update" >&2
30 (cd "$DIR" && bzr pull "$VERSION")
32 bzr get "$VERSION" "$DIR"
36 if [ -d "$DIR" ]; then
37 if [ ! -d "$DIR/{arch}" ]; then
38 echo "$DIR is not an arch checkout; cannot update" >&2
41 OLDVERSION="$(baz tree-version -d "$DIR")"
42 if [ "$VERSION" != "$OLDVERSION" ]; then
43 baz switch -d "$DIR" "$VERSION"
45 baz update -d "$DIR" "$VERSION"
48 baz get "$VERSION" "$DIR"