]> git.ozlabs.org Git - next-scripts/blobdiff - fetch_trees
move mmotm to here as well
[next-scripts] / fetch_trees
index b3db1a34b2737922dbcb551d20ea650d20df7fdd..6eb01c8418e90494a6627dc976fb13247c577610 100755 (executable)
@@ -24,11 +24,19 @@ for name in $trees; do
        fi
 
        if [ "$type" = "mmotm" ]; then
-               cd ../../mmotm/text || {
-                       echo "Cannot chdir to ../../mmotm/text" 1>&2
+               cd ../mmotm || {
+                       echo "Cannot chdir to ../mmotm" 1>&2
                        continue
                }
                rsync -avHP --exclude .git --exclude broken-out.tar.gz --delete ozlabs.org:~akpm/public_html/mmotm/. .
+               # we only use the fist lines of {origin,linux-next}.patch
+               [ -f broken-out/origin.patch ] &&
+                       sed -i 1q broken-out/origin.patch
+               [ -f broken-out/linux-next.patch ] &&
+                       sed -i 1q broken-out/linux-next.patch
+               git add -A .
+               [ "$(git status --porcelain)" ] &&
+                                git commit -m "$(head -n 1 .DATE)"
                cd "$origwd"
                continue
        fi