chiark / gitweb /
untested git support
authorColin Watson <cjwatson@chiark.greenend.org.uk>
Fri, 20 Jul 2007 06:42:03 +0000 (06:42 +0000)
committerColin Watson <cjwatson@chiark.greenend.org.uk>
Fri, 20 Jul 2007 06:42:03 +0000 (06:42 +0000)
baz-update-config

index ed53853..7158885 100755 (executable)
@@ -42,6 +42,17 @@ for line in $(baz cat-config "$1" 2>/dev/null || cat "$1"); do
                                esac
                        fi
                        ;;
+               git://*|git+*://*)
+                       if [ -d "$DIR" ]; then
+                               if [ ! -d "$DIR/.git" ]; then
+                                       echo "$DIR is not a git checkout; cannot update" >&2
+                                       continue
+                               fi
+                               (cd "$DIR" && git pull "$VERSION")
+                       else
+                               git clone "$VERSION" "$DIR"
+                       fi
+                       ;;
                *)
                        if [ -d "$DIR" ]; then
                                if [ ! -d "$DIR/{arch}" ]; then