IFS_SAVE="$IFS"
IFS="$NEWLINE"
-for line in $(baz cat-config "$1"); do
+for line in $(baz cat-config "$1" 2>/dev/null || cat "$1"); do
IFS="$IFS_SAVE"
set -- $line
DIR="$1"
echo "Updating $DIR ($VERSION) ..."
case $VERSION in
- http://*)
+ bzr+ssh://*|http://*|sftp://*)
if [ -d "$DIR" ]; then
if [ ! -d "$DIR/.bzr" ]; then
echo "$DIR is not a bzr checkout; cannot update" >&2
continue
+ elif [ -f "$DIR/.bzr/branch/bound" ]; then
+ bzr update "$DIR"
+ else
+ (cd "$DIR" && bzr pull "$VERSION")
fi
- (cd "$DIR" && bzr pull "$VERSION")
else
- bzr get "$VERSION" "$DIR"
+ case $VERSION in
+ bzr+ssh://*|sftp://*)
+ bzr checkout "$VERSION" "$DIR"
+ ;;
+ *)
+ bzr get "$VERSION" "$DIR"
+ ;;
+ esac
fi
;;
*)