# HG changeset patch # User Rob Landley # Date 1292194042 21600 # Node ID c27b8c8a1b1497178e0747258d9f87e323c467ac # Parent 7bcba6e2acc3d87f5eff8d2f3fdbd707b12d787f Break down and use git instead of hg for upstream kernel source. diff -r 7bcba6e2acc3 -r c27b8c8a1b14 make/functions.sh --- a/make/functions.sh Fri Jan 01 04:54:13 2010 -0600 +++ b/make/functions.sh Sun Dec 12 16:47:22 2010 -0600 @@ -15,7 +15,7 @@ function update_documentation_dir() { rm -rf "$WEBDIR"/Documentation/ - cp -a "$LNXDIR"/temp/Documentation "$WEBDIR"/Documentation + cp -a "$LNXDIR"/Documentation "$WEBDIR"/Documentation # Make the change directory local to this function ( cd $WEBDIR @@ -25,7 +25,7 @@ # Clone or update mercurial Linux kernel repository from kernel.org -function get_hg() +function get_git() { # Make the chdir local to this function ( @@ -33,18 +33,20 @@ then echo "Clone Linux kernel repository from kernel.org" - mkdir -p "$LNXDIR"/hg && - cd "$LNXDIR"/hg && - hg clone http://kernel.org/hg/linux-2.6 hg + mkdir -p "$LNXDIR" && + cd "$LNXDIR" && + # hg clone http://kernel.org/hg/linux-2.6 + git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 .git --bare && + git checkout -f master else - # Update kernel mercurial repository. - cd "$LNXDIR"/hg && + # Update kernel git repository. + cd "$LNXDIR" && echo "Update Linux kernel from kernel.org" && - hg pull -u + git clean -fdx && git checkout -f master && git pull fi [ $? -ne 0 ] && exit 1 - echo "Linux version: $(hg tags | head -n 2 | tail -n 1 | awk '{print $1}')" + echo "Linux version: $(git describe --abbrev=0)" ) } @@ -52,7 +54,7 @@ { # Make the chdir local ( - cd "$LNXDIR"/temp && + cd "$LNXDIR" && make -j 2 htmldocs ) } @@ -61,7 +63,7 @@ { # Make the chdir local ( - cd "$LNXDIR"/temp && + cd "$LNXDIR" && # Probably redundant, but just in case... make -j 2 xmldocs && cd Documentation/DocBook && @@ -77,7 +79,7 @@ { ( rm -rf $WEBDIR/htmldocs - cd "$LNXDIR"/temp/Documentation/DocBook && + cd "$LNXDIR"/Documentation/DocBook && # Install nochunks versions mv xhtml-nochunks "$WEBDIR"/htmldocs && @@ -115,8 +117,8 @@ function htmlize_menuconfig() { ( - cd "$LNXDIR"/hg && - LNXTAG="$(hg tags | head -n 2 | tail -n 1 | awk '{print $1}')" + cd "$LNXDIR" && + LNXTAG="$(git describe --abbrev=0)" rm -rf "$WEBDIR"/menuconfig/ mkdir -p "$WEBDIR"/menuconfig && @@ -155,10 +157,10 @@ [ $? -ne 0 ] && exit 1 fi - if [ -z "$(find ols/2009 -name "*.pdf")" ] + if [ -z "$(find ols/2010 -name "*.pdf")" ] then echo "Split ols files" - mkdir -p ols/{1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009} && + mkdir -p ols/{1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010} && cp mirror/ols2001/*.pdf ols/2001 && make/splitols.py mirror ols @@ -172,7 +174,7 @@ ( rm -rf "$WEBDIR"/readme mkdir "$WEBDIR"/readme && - cd "$LNXDIR"/hg && + cd "$LNXDIR" && make help > "$WEBDIR"/makehelp.txt && for i in $(find . -name "*[Rr][Ee][Aa][Dd][Mm][Ee]*" | grep -v "Documentation/") do @@ -190,7 +192,7 @@ echo -n "Search for RFC references" x=0 # Iterate through *.c and *.h in the Linux source code. - for i in `find "$LNXDIR"/hg -name "*.[hc]"` + for i in `find "$LNXDIR" -name "*.[hc]"` do # Progress indicator x=$[$x+1] @@ -218,9 +220,9 @@ for i in $(sed 's/.*://' temp-linuxrfc.txt | sort -u | sort -t c -k 2,2 -n) do echo '
  • '$i'

    ' - for j in $(sed -rn 's@\'"$LNXDIR"/hg'(.*):'$i'$@\1@p' temp-linuxrfc.txt) + for j in $(sed -rn 's@\'"$LNXDIR"'(.*):'$i'$@\1@p' temp-linuxrfc.txt) do - echo ''$j'' + echo ''$j'' done echo "

  • " done @@ -235,6 +237,9 @@ function setuplinuxtemp() { + # Stub this out for now + return 0 + rm -rf "$LNXDIR"/temp && mkdir "$LNXDIR"/temp && # Building out of tree conflicts with patching the files, so copy. diff -r 7bcba6e2acc3 -r c27b8c8a1b14 make/make.sh --- a/make/make.sh Fri Jan 01 04:54:13 2010 -0600 +++ b/make/make.sh Sun Dec 12 16:47:22 2010 -0600 @@ -3,18 +3,18 @@ # Set environment variables and call do-*.sh in sequence [ -z "$WEBDIR" ] && export WEBDIR=~/www/kdocs -[ -z "$LNXDIR" ] && export LNXDIR=~/linux +[ -z "$LNXDIR" ] && export LNXDIR=~/linux/linux source "$WEBDIR"/make/functions.sh # Update mercurial repository -if [ "$1" != "--nonet" ] -then - echo "Update Linux source from mercurial on kernel.org" - get_hg || exit 1 -else - shift -fi +#if [ "$1" != "--nonet" ] +#then +# echo "Update Linux source from mercurial on kernel.org" +# get_git || exit 1 +#else +# shift +#fi echo "Set up Linux build directory" setuplinuxtemp || exit 1