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 ed53853825d19a6592fa44a8122f045f864e2a44..71588857cf05a071aa174c184359ebe5e9f722b2 100755 (executable)
@@ -42,6 +42,17 @@ for line in $(baz cat-config "$1" 2>/dev/null || cat "$1"); do
                                esac
                        fi
                        ;;
                                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
                *)
                        if [ -d "$DIR" ]; then
                                if [ ! -d "$DIR/{arch}" ]; then