[Clfs-commits] commit: r4698 - in /trunk/scripts/patch: bash-patch.sh binutils-patch.sh gcc-patch.sh ncurses-patch.sh readline-patch.sh vim-patch.sh

svn at cross-lfs.org svn at cross-lfs.org
Mon Feb 16 12:47:36 PST 2009


Author: jim
Date: Mon Feb 16 20:47:36 2009
New Revision: 4698

Log:
Figure out what the last patch # is and grab the next #

Modified:
    trunk/scripts/patch/bash-patch.sh
    trunk/scripts/patch/binutils-patch.sh
    trunk/scripts/patch/gcc-patch.sh
    trunk/scripts/patch/ncurses-patch.sh
    trunk/scripts/patch/readline-patch.sh
    trunk/scripts/patch/vim-patch.sh

Modified: trunk/scripts/patch/bash-patch.sh
==============================================================================
--- trunk/scripts/patch/bash-patch.sh (original)
+++ trunk/scripts/patch/bash-patch.sh Mon Feb 16 20:47:36 2009
@@ -29,6 +29,14 @@
 if ! [ -e bash-${VERSION}.tar.gz ]; then
   wget ftp://ftp.cwru.edu/pub/bash/bash-${VERSION}.tar.gz
 fi
+
+# Set Patch Number
+#
+cd /usr/src
+wget http://svn.cross-lfs.org/svn/repos/cross-lfs/trunk/patches/ --no-remove-listing
+PATCH_NUM=$(cat index.html | grep bash | grep "${VERSION}" | grep branch_update | cut -f2 -d'"' | cut -f1 -d'"'| cut -f4 -d- | cut -f1 -d. | tail -n 1)
+PATCH_NUM=$(expr ${PATCH_NUM} + 1)
+rm -f index.html
 
 # Cleanup Directory
 #
@@ -96,16 +104,16 @@
 # Create Patch
 #
 cd /usr/src
-echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > bash-${VERSION}-branch_update-x.patch
-echo "Date: `date +%m-%d-%Y`" >> bash-${VERSION}-branch_update-x.patch
-echo "Initial Package Version: ${VERSION}" >> bash-${VERSION}-branch_update-x.patch
-echo "Origin: Upstream" >> bash-${VERSION}-branch_update-x.patch
-echo "Upstream Status: Applied" >> bash-${VERSION}-branch_update-x.patch
-echo "Description: Contains all upstream patches up to ${VERSION}-${FILES}" >> bash-${VERSION}-branch_update-x.patch
+echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > bash-${VERSION}-branch_update-${PATCH_NUM}.patch
+echo "Date: `date +%m-%d-%Y`" >> bash-${VERSION}-branch_update-${PATCH_NUM}.patch
+echo "Initial Package Version: ${VERSION}" >> bash-${VERSION}-branch_update-${PATCH_NUM}.patch
+echo "Origin: Upstream" >> bash-${VERSION}-branch_update-${PATCH_NUM}.patch
+echo "Upstream Status: Applied" >> bash-${VERSION}-branch_update-${PATCH_NUM}.patch
+echo "Description: Contains all upstream patches up to ${VERSION}-${FILES}" >> bash-${VERSION}-branch_update-${PATCH_NUM}.patch
 if [ -n "${SKIPPED}" ]; then
-  echo "             The following patches were skipped" >> bash-${VERSION}-branch_update-x.patch
-  echo "            ${SKIPPED}" >> bash-${VERSION}-branch_update-x.patch
+  echo "             The following patches were skipped" >> bash-${VERSION}-branch_update-${PATCH_NUM}.patch
+  echo "            ${SKIPPED}" >> bash-${VERSION}-branch_update-${PATCH_NUM}.patch
 fi
-echo "" >> bash-${VERSION}-branch_update-x.patch
-diff -Naur bash-${VERSION}.orig bash-${VERSION} >> bash-${VERSION}-branch_update-x.patch
-echo "Created /usr/src/bash-${VERSION}-branch_update-x.patch."
+echo "" >> bash-${VERSION}-branch_update-${PATCH_NUM}.patch
+diff -Naur bash-${VERSION}.orig bash-${VERSION} >> bash-${VERSION}-branch_update-${PATCH_NUM}.patch
+echo "Created /usr/src/bash-${VERSION}-branch_update-${PATCH_NUM}.patch."

Modified: trunk/scripts/patch/binutils-patch.sh
==============================================================================
--- trunk/scripts/patch/binutils-patch.sh (original)
+++ trunk/scripts/patch/binutils-patch.sh Mon Feb 16 20:47:36 2009
@@ -22,6 +22,14 @@
 if ! [ -e binutils-${SOURCEVERSION}.tar.bz2  ]; then
   wget ftp://ftp.gnu.org/gnu/binutils/binutils-${SOURCEVERSION}.tar.bz2
 fi
+
+# Set Patch Number
+#
+cd /usr/src
+wget http://svn.cross-lfs.org/svn/repos/cross-lfs/trunk/patches/ --no-remove-listing
+PATCH_NUM=$(cat index.html | grep binutils | grep "${VERSION}" | grep branch_update | cut -f2 -d'"' | cut -f1 -d'"'| cut -f4 -d- | cut -f1 -d. | tail -n 1)
+PATCH_NUM=$(expr ${PATCH_NUM} + 1)
+rm -f index.html
 
 # Cleanup Directory
 #
@@ -69,13 +77,13 @@
 # Create Patch
 #
 cd /usr/src
-echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > binutils-${SOURCEVERSION}-branch_update-x.patch
-echo "Date: `date +%m-%d-%Y`" >> binutils-${SOURCEVERSION}-branch_update-x.patch
-echo "Initial Package Version: ${SOURCEVERSION}" >> binutils-${SOURCEVERSION}-branch_update-x.patch
-echo "Origin: Upstream" >> binutils-${SOURCEVERSION}-branch_update-x.patch
-echo "Upstream Status: Applied" >> binutils-${SOURCEVERSION}-branch_update-x.patch
-echo "Description: This is a branch update for binutils-${SOURCEVERSION}, and should be" >> binutils-${SOURCEVERSION}-branch_update-x.patch
-echo "             rechecked periodically." >> binutils-${SOURCEVERSION}-branch_update-x.patch
-echo "" >> binutils-${SOURCEVERSION}-branch_update-x.patch
-diff -Naur binutils-${SOURCEVERSION}.orig binutils-${SOURCEVERSION} >> binutils-${SOURCEVERSION}-branch_update-x.patch
-echo "Created /usr/src/binutils-${SOURCEVERSION}-branch_update-x.patch."
+echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > binutils-${SOURCEVERSION}-branch_update-${PATCH_NUM}.patch
+echo "Date: `date +%m-%d-%Y`" >> binutils-${SOURCEVERSION}-branch_update-${PATCH_NUM}.patch
+echo "Initial Package Version: ${SOURCEVERSION}" >> binutils-${SOURCEVERSION}-branch_update-${PATCH_NUM}.patch
+echo "Origin: Upstream" >> binutils-${SOURCEVERSION}-branch_update-${PATCH_NUM}.patch
+echo "Upstream Status: Applied" >> binutils-${SOURCEVERSION}-branch_update-${PATCH_NUM}.patch
+echo "Description: This is a branch update for binutils-${SOURCEVERSION}, and should be" >> binutils-${SOURCEVERSION}-branch_update-${PATCH_NUM}.patch
+echo "             rechecked periodically." >> binutils-${SOURCEVERSION}-branch_update-${PATCH_NUM}.patch
+echo "" >> binutils-${SOURCEVERSION}-branch_update-${PATCH_NUM}.patch
+diff -Naur binutils-${SOURCEVERSION}.orig binutils-${SOURCEVERSION} >> binutils-${SOURCEVERSION}-branch_update-${PATCH_NUM}.patch
+echo "Created /usr/src/binutils-${SOURCEVERSION}-branch_update-${PATCH_NUM}.patch."

Modified: trunk/scripts/patch/gcc-patch.sh
==============================================================================
--- trunk/scripts/patch/gcc-patch.sh (original)
+++ trunk/scripts/patch/gcc-patch.sh Mon Feb 16 20:47:36 2009
@@ -19,6 +19,14 @@
 if ! [ -e gcc-${VERSION}.tar.bz2  ]; then
   wget ftp://gcc.gnu.org/pub/gcc/releases/gcc-${VERSION}/gcc-${VERSION}.tar.bz2
 fi
+
+# Set Patch Number
+#
+cd /usr/src
+wget http://svn.cross-lfs.org/svn/repos/cross-lfs/trunk/patches/ --no-remove-listing
+PATCH_NUM=$(cat index.html | grep gcc | grep "${VERSION}" | grep branch_update | cut -f2 -d'"' | cut -f1 -d'"'| cut -f4 -d- | cut -f1 -d. | tail -n 1)
+PATCH_NUM=$(expr ${PATCH_NUM} + 1)
+rm -f index.html
 
 # Cleanup Directory
 #
@@ -56,13 +64,13 @@
 # Create Patch
 #
 cd /usr/src
-echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > gcc-${VERSION}-branch_update-x.patch
-echo "Date: `date +%m-%d-%Y`" >> gcc-${VERSION}-branch_update-x.patch
-echo "Initial Package Version: ${VERSION}" >> gcc-${VERSION}-branch_update-x.patch
-echo "Origin: Upstream" >> gcc-${VERSION}-branch_update-x.patch
-echo "Upstream Status: Applied" >> gcc-${VERSION}-branch_update-x.patch
-echo "Description: This is a branch update for gcc-${VERSION}, and should be" >> gcc-${VERSION}-branch_update-x.patch
-echo "             rechecked periodically." >> gcc-${VERSION}-branch_update-x.patch
-echo "" >> gcc-${VERSION}-branch_update-x.patch
-diff -Naur gcc-${VERSION}.orig gcc-${VERSION} >> gcc-${VERSION}-branch_update-x.patch
-echo "Created /usr/src/gcc-${VERSION}-branch_update-x.patch."
+echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > gcc-${VERSION}-branch_update-${PATCH_NUM}.patch
+echo "Date: `date +%m-%d-%Y`" >> gcc-${VERSION}-branch_update-${PATCH_NUM}.patch
+echo "Initial Package Version: ${VERSION}" >> gcc-${VERSION}-branch_update-${PATCH_NUM}.patch
+echo "Origin: Upstream" >> gcc-${VERSION}-branch_update-${PATCH_NUM}.patch
+echo "Upstream Status: Applied" >> gcc-${VERSION}-branch_update-${PATCH_NUM}.patch
+echo "Description: This is a branch update for gcc-${VERSION}, and should be" >> gcc-${VERSION}-branch_update-${PATCH_NUM}.patch
+echo "             rechecked periodically." >> gcc-${VERSION}-branch_update-${PATCH_NUM}.patch
+echo "" >> gcc-${VERSION}-branch_update-${PATCH_NUM}.patch
+diff -Naur gcc-${VERSION}.orig gcc-${VERSION} >> gcc-${VERSION}-branch_update-${PATCH_NUM}.patch
+echo "Created /usr/src/gcc-${VERSION}-branch_update-${PATCH_NUM}.patch."

Modified: trunk/scripts/patch/ncurses-patch.sh
==============================================================================
--- trunk/scripts/patch/ncurses-patch.sh (original)
+++ trunk/scripts/patch/ncurses-patch.sh Mon Feb 16 20:47:36 2009
@@ -28,6 +28,14 @@
 if ! [ -e ncurses-${VERSION}.tar.gz ]; then
   wget ftp://invisible-island.net/ncurses/ncurses-${VERSION}.tar.gz
 fi
+
+# Set Patch Number
+#
+cd /usr/src
+wget http://svn.cross-lfs.org/svn/repos/cross-lfs/trunk/patches/ --no-remove-listing
+PATCH_NUM=$(cat index.html | grep ncurses | grep "${VERSION}" | grep branch_update | cut -f2 -d'"' | cut -f1 -d'"'| cut -f4 -d- | cut -f1 -d. | tail -n 1)
+PATCH_NUM=$(expr ${PATCH_NUM} + 1)
+rm -f index.html
 
 # Cleanup Directory
 #
@@ -93,13 +101,13 @@
 # Create Patch
 #
 cd /usr/src
-echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > ncurses-${VERSION}-branch_update-x.patch
-echo "Date: `date +%m-%d-%Y`" >> ncurses-${VERSION}-branch_update-x.patch
-echo "Initial Package Version: ${VERSION}" >> ncurses-${VERSION}-branch_update-x.patch
-echo "Origin: Upstream" >> ncurses-${VERSION}-branch_update-x.patch
-echo "Upstream Status: Applied" >> ncurses-${VERSION}-branch_update-x.patch
-echo "Description: This is a branch update for NCurses-${VERSION}, and should be" >> ncurses-${VERSION}-branch_update-x.patch
-echo "             rechecked periodically. This patch covers up to ${VERSION}-${LASTFILE}." >> ncurses-${VERSION}-branch_update-x.patch
-echo "" >> ncurses-${VERSION}-branch_update-x.patch
-diff -Naur ncurses-${VERSION}.orig ncurses-${VERSION} >> ncurses-${VERSION}-branch_update-x.patch
-echo "Created /usr/src/ncurses-${VERSION}-branch_update-x.patch."
+echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > ncurses-${VERSION}-branch_update-${PATCH_NUM}.patch
+echo "Date: `date +%m-%d-%Y`" >> ncurses-${VERSION}-branch_update-${PATCH_NUM}.patch
+echo "Initial Package Version: ${VERSION}" >> ncurses-${VERSION}-branch_update-${PATCH_NUM}.patch
+echo "Origin: Upstream" >> ncurses-${VERSION}-branch_update-${PATCH_NUM}.patch
+echo "Upstream Status: Applied" >> ncurses-${VERSION}-branch_update-${PATCH_NUM}.patch
+echo "Description: This is a branch update for NCurses-${VERSION}, and should be" >> ncurses-${VERSION}-branch_update-${PATCH_NUM}.patch
+echo "             rechecked periodically. This patch covers up to ${VERSION}-${LASTFILE}." >> ncurses-${VERSION}-branch_update-${PATCH_NUM}.patch
+echo "" >> ncurses-${VERSION}-branch_update-${PATCH_NUM}.patch
+diff -Naur ncurses-${VERSION}.orig ncurses-${VERSION} >> ncurses-${VERSION}-branch_update-${PATCH_NUM}.patch
+echo "Created /usr/src/ncurses-${VERSION}-branch_update-${PATCH_NUM}.patch."

Modified: trunk/scripts/patch/readline-patch.sh
==============================================================================
--- trunk/scripts/patch/readline-patch.sh (original)
+++ trunk/scripts/patch/readline-patch.sh Mon Feb 16 20:47:36 2009
@@ -29,6 +29,14 @@
 if ! [ -e readline-${VERSION}.tar.gz ]; then
   wget ftp://ftp.cwru.edu/pub/bash/readline-${VERSION}.tar.gz
 fi
+
+# Set Patch Number
+#
+cd /usr/src
+wget http://svn.cross-lfs.org/svn/repos/cross-lfs/trunk/patches/ --no-remove-listing
+PATCH_NUM=$(cat index.html | grep readline | grep "${VERSION}" | grep branch_update | cut -f2 -d'"' | cut -f1 -d'"'| cut -f4 -d- | cut -f1 -d. | tail -n 1)
+PATCH_NUM=$(expr ${PATCH_NUM} + 1)
+rm -f index.html
 
 # Cleanup Directory
 #
@@ -97,16 +105,16 @@
 # Create Patch
 #
 cd /usr/src
-echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > readline-${VERSION}-branch_update-x.patch
-echo "Date: `date +%m-%d-%Y`" >> readline-${VERSION}-branch_update-x.patch
-echo "Initial Package Version: ${VERSION}" >> readline-${VERSION}-branch_update-x.patch
-echo "Origin: Upstream" >> readline-${VERSION}-branch_update-x.patch
-echo "Upstream Status: Applied" >> readline-${VERSION}-branch_update-x.patch
-echo "Description: Contains all upstream patches up to ${VERSION}-${FILES}" >> readline-${VERSION}-branch_update-x.patch
+echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > readline-${VERSION}-branch_update-${PATCH_NUM}.patch
+echo "Date: `date +%m-%d-%Y`" >> readline-${VERSION}-branch_update-${PATCH_NUM}.patch
+echo "Initial Package Version: ${VERSION}" >> readline-${VERSION}-branch_update-${PATCH_NUM}.patch
+echo "Origin: Upstream" >> readline-${VERSION}-branch_update-${PATCH_NUM}.patch
+echo "Upstream Status: Applied" >> readline-${VERSION}-branch_update-${PATCH_NUM}.patch
+echo "Description: Contains all upstream patches up to ${VERSION}-${FILES}" >> readline-${VERSION}-branch_update-${PATCH_NUM}.patch
 if [ -n "${SKIPPED}" ]; then
-  echo "            Thee following patches were skipped" >> readline-${VERSION}-branch_update-x.patch
-  echo "            ${SKIPPED}" >> readline-${VERSION}-branch_update-x.patch
+  echo "            Thee following patches were skipped" >> readline-${VERSION}-branch_update-${PATCH_NUM}.patch
+  echo "            ${SKIPPED}" >> readline-${VERSION}-branch_update-${PATCH_NUM}.patch
 fi
-echo "" >> readline-${VERSION}-branch_update-x.patch
-diff -Naur readline-${VERSION}.orig readline-${VERSION} >> readline-${VERSION}-branch_update-x.patch
-echo "Created /usr/src/readline-${VERSION}-branch_update-x.patch."
+echo "" >> readline-${VERSION}-branch_update-${PATCH_NUM}.patch
+diff -Naur readline-${VERSION}.orig readline-${VERSION} >> readline-${VERSION}-branch_update-${PATCH_NUM}.patch
+echo "Created /usr/src/readline-${VERSION}-branch_update-${PATCH_NUM}.patch."

Modified: trunk/scripts/patch/vim-patch.sh
==============================================================================
--- trunk/scripts/patch/vim-patch.sh (original)
+++ trunk/scripts/patch/vim-patch.sh Mon Feb 16 20:47:36 2009
@@ -29,6 +29,14 @@
 if ! [ -e vim-${VERSION}.tar.bz2 ]; then
   wget ftp://ftp.vim.org/pub/vim/unix/vim-${VERSION}.tar.bz2
 fi
+
+# Set Patch Number
+#
+cd /usr/src
+wget http://svn.cross-lfs.org/svn/repos/cross-lfs/trunk/patches/ --no-remove-listing
+PATCH_NUM=$(cat index.html | grep vim | grep "${VERSION}" | grep branch_update | cut -f2 -d'"' | cut -f1 -d'"'| cut -f4 -d- | cut -f1 -d. | tail -n 1)
+PATCH_NUM=$(expr ${PATCH_NUM} + 1)
+rm -f index.html
 
 # Cleanup Directory
 #
@@ -75,7 +83,7 @@
       SKIPPED="${SKIPPED} ${DLCOUNT}"
     fi
    fi
-   COUNT=`expr ${COUNT} + 1`
+   COUNT=$(expr ${COUNT} + 1)
 done
 
 # Cleanup Directory
@@ -95,16 +103,16 @@
 # Create Patch
 #
 cd /usr/src
-echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > vim-${VERSION}-branch_update-x.patch
-echo "Date: `date +%m-%d-%Y`" >> vim-${VERSION}-branch_update-x.patch
-echo "Initial Package Version: ${VERSION}" >> vim-${VERSION}-branch_update-x.patch
-echo "Origin: Upstream" >> vim-${VERSION}-branch_update-x.patch
-echo "Upstream Status: Applied" >> vim-${VERSION}-branch_update-x.patch
-echo "Description: Contains all upstream patches up to ${VERSION}.${FILES}" >> vim-${VERSION}-branch_update-x.patch
+echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > vim-${VERSION}-branch_update-$(PATCH_NUM}.patch
+echo "Date: `date +%m-%d-%Y`" >> vim-${VERSION}-branch_update-$(PATCH_NUM}.patch
+echo "Initial Package Version: ${VERSION}" >> vim-${VERSION}-branch_update-$(PATCH_NUM}.patch
+echo "Origin: Upstream" >> vim-${VERSION}-branch_update-$(PATCH_NUM}.patch
+echo "Upstream Status: Applied" >> vim-${VERSION}-branch_update-$(PATCH_NUM}.patch
+echo "Description: Contains all upstream patches up to ${VERSION}.${FILES}" >> vim-${VERSION}-branch_update-$(PATCH_NUM}.patch
 if [ -n "${SKIPPED}" ]; then
-  echo "             The following patches were skipped" >> vim-${VERSION}-branch_update-x.patch
-  echo "            ${SKIPPED}" >> vim-${VERSION}-branch_update-x.patch
+  echo "             The following patches were skipped" >> vim-${VERSION}-branch_update-$(PATCH_NUM}.patch
+  echo "            ${SKIPPED}" >> vim-${VERSION}-branch_update-$(PATCH_NUM}.patch
 fi
-echo "" >> vim-${VERSION}-branch_update-x.patch
-diff -Naur vim${SERIES}.orig vim${SERIES} >> vim-${VERSION}-branch_update-x.patch
-echo "Created /usr/src/vim-${VERSION}-branch_update-x.patch."
+echo "" >> vim-${VERSION}-branch_update-$(PATCH_NUM}.patch
+diff -Naur vim${SERIES}.orig vim${SERIES} >> vim-${VERSION}-branch_update-$(PATCH_NUM}.patch
+echo "Created /usr/src/vim-${VERSION}-branch_update-$(PATCH_NUM}.patch."




More information about the Clfs-commits mailing list