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

svn at cross-lfs.org svn at cross-lfs.org
Tue Jan 20 16:01:20 PST 2009


Author: jim
Date: Wed Jan 21 00:01:19 2009
New Revision: 4513

Log:
Added Perl Patch and cleaned up

Added:
    trunk/scripts/patch/perl-patch.sh   (with props)
Modified:
    trunk/scripts/patch/bash-patch.sh
    trunk/scripts/patch/binutils-patch.sh
    trunk/scripts/patch/gcc-patch.sh
    trunk/scripts/patch/gcc-specs-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 Wed Jan 21 00:01:19 2009
@@ -8,8 +8,9 @@
 # Check Input
 #
 if [ "${VERSION}" = "" ]; then
-	echo "$0 - Bash_Version"
-	echo "This will Create a Patch for Bash Bash_Version"
+  echo "$0 - Bash_Version"
+  echo "This will Create a Patch for Bash Bash_Version"
+  exit 255
 fi
 
 # Get the # of Patches
@@ -26,7 +27,7 @@
 # Download BASH Source
 #
 if ! [ -e bash-${VERSION}.tar.gz ]; then
-	wget ftp://ftp.cwru.edu/pub/bash/bash-${VERSION}.tar.gz
+  wget ftp://ftp.cwru.edu/pub/bash/bash-${VERSION}.tar.gz
 fi
 
 # Cleanup Directory
@@ -43,51 +44,51 @@
 mkdir /tmp/bash-${VERSION}
 COUNT=1
 while [ ${COUNT} -le ${FILES} ]; do
-	cd /tmp/bash-${VERSION}           
-	DLCOUNT="${COUNT}"
-	SKIPME=no
-	if [ "${COUNT}" -lt "100" ]; then
-		DLCOUNT="0${COUNT}"
-	fi
-	if [ "${COUNT}" -lt "10" ]; then
-		DLCOUNT="00${COUNT}"
-	fi
-	for skip in ${SKIPPATCH} ; do
-		if [ "${DLCOUNT}" = "$skip" ]; then
-			echo "Patch bash${VERSION2}-${DLCOUNT} skipped"
-			SKIPPED="${SKIPPED} ${DLCOUNT}"
-			SKIPME=yes
-		fi
-	done
-	if [ "${SKIPME}" != "yes" ]; then
-		if ! [ -e ${VERSION}.${DLCOUNT} ]; then
-			wget --quiet ${PATCHURL}/bash${VERSION2}-${DLCOUNT}
-		fi
-		cd ${CURRENTDIR}
-		patch --dry-run -s -f -Np0 -i /tmp/bash-${VERSION}/bash${VERSION2}-${DLCOUNT}
-		if [ "$?" = "0" ]; then
-			echo "Patch bash${VERSION2}-${DLCOUNT} applied"
-			patch -s -Np0 -i /tmp/bash-${VERSION}/bash${VERSION2}-${DLCOUNT}
-		else
-			echo "Patch bash${VERSION2}-${DLCOUNT} not applied"
-			rm -f /tmp/bash-${VERSION}/bash${VERSION2}-${DLCOUNT}
-			SKIPPED="${SKIPPED} ${DLCOUNT}"
-		fi
-	fi
-	COUNT=`expr ${COUNT} + 1`
+  cd /tmp/bash-${VERSION}           
+  DLCOUNT="${COUNT}"
+  SKIPME=no
+  if [ "${COUNT}" -lt "100" ]; then
+    DLCOUNT="0${COUNT}"
+  fi
+  if [ "${COUNT}" -lt "10" ]; then
+    DLCOUNT="00${COUNT}"
+  fi
+  for skip in ${SKIPPATCH} ; do
+    if [ "${DLCOUNT}" = "$skip" ]; then
+      echo "Patch bash${VERSION2}-${DLCOUNT} skipped"
+      SKIPPED="${SKIPPED} ${DLCOUNT}"
+      SKIPME=yes
+    fi
+  done
+  if [ "${SKIPME}" != "yes" ]; then
+    if ! [ -e ${VERSION}.${DLCOUNT} ]; then
+      wget --quiet ${PATCHURL}/bash${VERSION2}-${DLCOUNT}
+    fi
+    cd ${CURRENTDIR}
+    patch --dry-run -s -f -Np0 -i /tmp/bash-${VERSION}/bash${VERSION2}-${DLCOUNT}
+    if [ "$?" = "0" ]; then
+      echo "Patch bash${VERSION2}-${DLCOUNT} applied"
+      patch -s -Np0 -i /tmp/bash-${VERSION}/bash${VERSION2}-${DLCOUNT}
+    else
+     echo "Patch bash${VERSION2}-${DLCOUNT} not applied"
+     rm -f /tmp/bash-${VERSION}/bash${VERSION2}-${DLCOUNT}
+     SKIPPED="${SKIPPED} ${DLCOUNT}"
+    fi
+  fi
+  COUNT=`expr ${COUNT} + 1`
 done
 
 # Cleanup Directory
 #
 
 for dir in $(find * -type d); do
-	cd /usr/src/bash-${VERSION}/${dir}
-	for file in $(find . -name '*~'); do
-		rm -f ${file}
-	done
-	for file in $(find . -name '*.orig'); do
-		rm -f ${file}
-	done
+  cd /usr/src/bash-${VERSION}/${dir}
+  for file in $(find . -name '*~'); do
+    rm -f ${file}
+  done
+  for file in $(find . -name '*.orig'); do
+    rm -f ${file}
+  done
 done
 cd /usr/src/bash-${VERSION}
 rm -f *~ *.orig
@@ -102,10 +103,9 @@
 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
 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-x.patch
+  echo "            ${SKIPPED}" >> bash-${VERSION}-branch_update-x.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."
-

Modified: trunk/scripts/patch/binutils-patch.sh
==============================================================================
--- trunk/scripts/patch/binutils-patch.sh (original)
+++ trunk/scripts/patch/binutils-patch.sh Wed Jan 21 00:01:19 2009
@@ -8,15 +8,16 @@
 # Check Input
 #
 if [ "${VERSION}" = "" ]; then
-	echo "$0 - Binutils_Version"
-	echo "This will Create a Patch for Binutils Binutils_Version"
+  echo "$0 - Binutils_Version"
+  echo "This will Create a Patch for Binutils Binutils_Version"
+  exit 255
 fi
 
 # Download Binutils Source
 #
 cd /usr/src
 if ! [ -e binutils-${VERSION}.tar.bz2  ]; then
-	wget ftp://ftp.gnu.org/gnu/binutils/binutils-${VERSION}.tar.bz2
+  wget ftp://ftp.gnu.org/gnu/binutils/binutils-${VERSION}.tar.bz2
 fi
 
 # Cleanup Directory
@@ -37,33 +38,33 @@
 #
 DIRS="binutils-${VERSION} binutils-${VERSION}.orig"
 for DIRECTORY in ${DIRS}; do
-cd /usr/src/${DIRECTORY}
-	FILE_LIST=".cvsignore *.gmo"
-	for files in ${FILE_LIST}; do
-		REMOVE=$(find * -name ${files})
-		for file in $REMOVE; do
-			rm -f ${file}
-		done
-	done
+  cd /usr/src/${DIRECTORY}
+  FILE_LIST=".cvsignore *.gmo"
+  for files in ${FILE_LIST}; do
+    REMOVE=$(find * -name ${files})
+    for file in $REMOVE; do
+      rm -f ${file}
+    done
+  done
 
-	REMOVE=".cvsignore MAINTAINERS COPYING.LIBGLOSS COPYING.NEWLIB README-maintainer-mode depcomp
-		ChangeLog compile ltgcc.m4 lt~obsolete.m4 etc/ChangeLog etc/add-log.el etc/add-log.vi"
-	for file in $REMOVE; do
-		rm -f ${file}
-	done
-	cd ..
+  REMOVE=".cvsignore MAINTAINERS COPYING.LIBGLOSS COPYING.NEWLIB README-maintainer-mode depcomp
+    ChangeLog compile ltgcc.m4 lt~obsolete.m4 etc/ChangeLog etc/add-log.el etc/add-log.vi"
+  for file in $REMOVE; do
+    rm -f ${file}
+    done
+    cd ..
 done
 
 # Cleanup Directory
 #
 for dir in $(find * -type d); do
-	cd /usr/src/binutils-${VERSION}
-	for file in $(find . -name '*~'); do
-		rm -f ${file}
-	done
-	for file in $(find . -name '*.orig'); do
-		rm -f ${file}
-	done
+  cd /usr/src/binutils-${VERSION}
+  for file in $(find . -name '*~'); do
+    rm -f ${file}
+  done
+  for file in $(find . -name '*.orig'); do
+    rm -f ${file}
+  done
 done
 cd /usr/src/binutils-${VERSION}
 rm -f *~ *.orig
@@ -88,4 +89,3 @@
 echo "" >> binutils-${VERSION}-branch_update-x.patch
 diff -Naur binutils-${VERSION}.orig binutils-${VERSION} >> binutils-${VERSION}-branch_update-x.patch
 echo "Created /usr/src/binutils-${VERSION}-branch_update-x.patch."
-

Modified: trunk/scripts/patch/gcc-patch.sh
==============================================================================
--- trunk/scripts/patch/gcc-patch.sh (original)
+++ trunk/scripts/patch/gcc-patch.sh Wed Jan 21 00:01:19 2009
@@ -8,15 +8,16 @@
 # Check Input
 #
 if [ "${VERSION}" = "" ]; then
-	echo "$0 - GCC_Version"
-	echo "This will Create a Patch for GCC GCC_Version"
+  echo "$0 - GCC_Version"
+  echo "This will Create a Patch for GCC GCC_Version"
+  exit 255
 fi
 
 # Download GCC Source
 #
 cd /usr/src
 if ! [ -e gcc-${VERSION}.tar.bz2  ]; then
-	wget ftp://ftp.gnu.org/gnu/gcc/gcc-${VERSION}/gcc-${VERSION}.tar.bz2
+  wget ftp://ftp.gnu.org/gnu/gcc/gcc-${VERSION}/gcc-${VERSION}.tar.bz2
 fi
 
 # Cleanup Directory
@@ -37,19 +38,19 @@
 # Cleanup
 DIRS="gcc-${VERSION} gcc-${VERSION}.orig"
 for DIRECTORY in ${DIRS}; do
-	cd ${DIRECTORY}
-	REMOVE="ABOUT-NLS COPYING COPYING.LIB ChangeLog ChangeLog.tree-ssa MAINTAINERS Makefile.def
-		Makefile.in Makefile.tpl README README.SCO boehm-gc/ChangeLog BUGS FAQ LAST_UPDATED
-		MD5SUMS NEWS bugs.html faq.html gcc/BASE-VER gcc/DATESTAMP gcc/DEV-PHASE gcc/c-parse.c
-		gcc/gengtype-lex.c gcc/c-parse.y gcc/gengtype-yacc.c gcc/gengtype-yacc.h gcc/f/BUGS gcc/f/NEWS
-		gcc/java/parse-scan.c gcc/java/parse.c gcc/objc/objc-parse.c gcc/objc/objc-parse.y"
-	for file in ${REMOVE}; do
-		rm -f $file
-	done
-	rm -rf INSTALL
-	rm -f fastjar/*.{1,info} gcc/doc/*.{1,info,7} gcc/fortran/*.{1,info,7}
-	rm -f gcc/po/*.{gmo,po}  libcpp/po/*.{gmo,po} libgomp/*.{1,info,7}
-	cd .. 
+  cd ${DIRECTORY}
+  REMOVE="ABOUT-NLS COPYING COPYING.LIB ChangeLog ChangeLog.tree-ssa MAINTAINERS Makefile.def
+    Makefile.in Makefile.tpl README README.SCO boehm-gc/ChangeLog BUGS FAQ LAST_UPDATED
+    MD5SUMS NEWS bugs.html faq.html gcc/BASE-VER gcc/DATESTAMP gcc/DEV-PHASE gcc/c-parse.c
+    gcc/gengtype-lex.c gcc/c-parse.y gcc/gengtype-yacc.c gcc/gengtype-yacc.h gcc/f/BUGS gcc/f/NEWS
+    gcc/java/parse-scan.c gcc/java/parse.c gcc/objc/objc-parse.c gcc/objc/objc-parse.y"
+  for file in ${REMOVE}; do
+    rm -f $file
+  done
+  rm -rf INSTALL
+  rm -f fastjar/*.{1,info} gcc/doc/*.{1,info,7} gcc/fortran/*.{1,info,7}
+  rm -f gcc/po/*.{gmo,po}  libcpp/po/*.{gmo,po} libgomp/*.{1,info,7}
+  cd .. 
 done
 
 # Create Patch
@@ -65,5 +66,3 @@
 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."
-
-

Modified: trunk/scripts/patch/gcc-specs-patch.sh
==============================================================================
--- trunk/scripts/patch/gcc-specs-patch.sh (original)
+++ trunk/scripts/patch/gcc-specs-patch.sh Wed Jan 21 00:01:19 2009
@@ -8,15 +8,16 @@
 # Check Input
 #
 if [ "${VERSION}" = "" ]; then
-	echo "$0 - GCC_Version"
-	echo "This will Create a Patch for GCC Specs GCC_Version"
+  echo "$0 - GCC_Version"
+  echo "This will Create a Patch for GCC Specs GCC_Version"
+  exit 255
 fi
 
 # Download GCC Source
 #
 cd /usr/src
 if ! [ -e gcc-${VERSION}.tar.bz2  ]; then
-	wget ftp://ftp.gnu.org/gnu/gcc/gcc-${VERSION}/gcc-${VERSION}.tar.bz2
+  wget ftp://ftp.gnu.org/gnu/gcc/gcc-${VERSION}/gcc-${VERSION}.tar.bz2
 fi
 
 # Cleanup Directory
@@ -30,16 +31,16 @@
 #
 cd /usr/src/gcc-${VERSION}
 for file in $(find gcc/config -name "*.h"); do
-	if [ "$(echo ${file} | grep -c bsd)" = "0" ]; then
-		if [ "$(cat ${file} | grep -c DYNAMIC_LINKER)" != "0" ]; then
-			echo "Modifying ${file}..."
-			sed -i '/DYNAMIC_LINKER/s@"/lib@"/tools/lib@' ${file}
-		fi
-		if [ "$(cat ${file} | grep -c DYNAMIC_LINKER)" != "0" ]; then
-			echo "Modifying ${file}..."
-			sed -i '/-dynamic-linker/s@ /lib@ /tools/lib@' ${file}
-		fi
-	fi
+  if [ "$(echo ${file} | grep -c bsd)" = "0" ]; then
+    if [ "$(cat ${file} | grep -c DYNAMIC_LINKER)" != "0" ]; then
+      echo "Modifying ${file}..."
+      sed -i '/DYNAMIC_LINKER/s@"/lib@"/tools/lib@' ${file}
+    fi
+    if [ "$(cat ${file} | grep -c DYNAMIC_LINKER)" != "0" ]; then
+      echo "Modifying ${file}..."
+      sed -i '/-dynamic-linker/s@ /lib@ /tools/lib@' ${file}
+    fi
+  fi
 done
 
 

Modified: trunk/scripts/patch/ncurses-patch.sh
==============================================================================
--- trunk/scripts/patch/ncurses-patch.sh (original)
+++ trunk/scripts/patch/ncurses-patch.sh Wed Jan 21 00:01:19 2009
@@ -8,8 +8,9 @@
 # Check Input
 #
 if [ "${VERSION}" = "" ]; then
-        echo "$0 - Ncurses_Version"
-        echo "This will Create a Patch for Ncurses Ncurses_Version"
+  echo "$0 - Ncurses_Version"
+  echo "This will Create a Patch for Ncurses Ncurses_Version"
+  exit 255
 fi
 
 # Get Patch Names
@@ -25,7 +26,7 @@
 # Download Ncurses Source
 #
 if ! [ -e ncurses-${VERSION}.tar.gz ]; then
-	wget ftp://invisible-island.net/ncurses/ncurses-${VERSION}.tar.gz
+  wget ftp://invisible-island.net/ncurses/ncurses-${VERSION}.tar.gz
 fi
 
 # Cleanup Directory
@@ -41,36 +42,36 @@
 mkdir /tmp/ncurses-${VERSION}
 cd /tmp/ncurses-${VERSION}
 if [ "${ROLLUP}" != "" ]; then
-	echo "Getting Rollup ${ROLLUP} Patch..."
-	wget --quiet ftp://invisible-island.net/ncurses/${VERSION}/${ROLLUP}
-	cd ${CURRENTDIR}
-	echo "Applying Rollup ${ROLLUP} Patch..."
-	cp /tmp/ncurses-${VERSION}/${ROLLUP} ${CURRENTDIR}/${ROLLUP}
-	bunzip2 ${ROLLUP}
-	ROLLUP2=$(echo ${ROLLUP} | sed -e 's/.bz2//g')
-	sh ${ROLLUP2}
+  echo "Getting Rollup ${ROLLUP} Patch..."
+  wget --quiet ftp://invisible-island.net/ncurses/${VERSION}/${ROLLUP}
+  cd ${CURRENTDIR}
+  echo "Applying Rollup ${ROLLUP} Patch..."
+  cp /tmp/ncurses-${VERSION}/${ROLLUP} ${CURRENTDIR}/${ROLLUP}
+  bunzip2 ${ROLLUP}
+  ROLLUP2=$(echo ${ROLLUP} | sed -e 's/.bz2//g')
+  sh ${ROLLUP2}
 fi
 
 # Download and Apply Patches
 #
 for file in ${FILES}; do
-	if [ "${ROLLPATCH}" != "" ]; then
-		TEST=$(echo ${file} | grep -c ${ROLLPATCH})
-	else
-		TEST=0
-	fi
-	if [ "${TEST}" = "0" ]; then
-		cd /tmp/ncurses-${VERSION}
-		echo "Getting Patch ${file}..."
-		wget --quiet ftp://invisible-island.net/ncurses/${VERSION}/${file}
-		cd ${CURRENTDIR}
-		gunzip -c /tmp/ncurses-${VERSION}/${file} | patch --dry-run -s -f -Np1
-		if [ "$?" = "0" ]; then
-			echo "Apply Patch ${file}..."
-			gunzip -c /tmp/ncurses-${VERSION}/${file} | patch -Np1
-			LASTFILE=$(echo ${file} | cut -f2 -d. | cut -f2 -d-)
-		fi
-	fi
+  if [ "${ROLLPATCH}" != "" ]; then
+    TEST=$(echo ${file} | grep -c ${ROLLPATCH})
+  else
+    TEST=0
+  fi
+  if [ "${TEST}" = "0" ]; then
+    cd /tmp/ncurses-${VERSION}
+    echo "Getting Patch ${file}..."
+    wget --quiet ftp://invisible-island.net/ncurses/${VERSION}/${file}
+    cd ${CURRENTDIR}
+    gunzip -c /tmp/ncurses-${VERSION}/${file} | patch --dry-run -s -f -Np1
+    if [ "$?" = "0" ]; then
+      echo "Apply Patch ${file}..."
+      gunzip -c /tmp/ncurses-${VERSION}/${file} | patch -Np1
+      LASTFILE=$(echo ${file} | cut -f2 -d. | cut -f2 -d-)
+    fi
+  fi
 done
 
 # Cleanup Directory
@@ -78,13 +79,13 @@
 # Cleanup Directory
 #
 for dir in $(find * -type d); do
-	cd /usr/src/ncurses-${VERSION}/${dir}
-	for file in $(find . -name '*~'); do
-		rm -f ${file}
-	done
-	for file in $(find . -name '*.orig'); do
-		rm -f ${file}
-	done
+  cd /usr/src/ncurses-${VERSION}/${dir}
+  for file in $(find . -name '*~'); do
+    rm -f ${file}
+  done
+  for file in $(find . -name '*.orig'); do
+    rm -f ${file}
+  done
 done
 cd /usr/src/ncurses-${VERSION}
 rm -f *~ *.orig

Modified: trunk/scripts/patch/readline-patch.sh
==============================================================================
--- trunk/scripts/patch/readline-patch.sh (original)
+++ trunk/scripts/patch/readline-patch.sh Wed Jan 21 00:01:19 2009
@@ -8,8 +8,9 @@
 # Check Input
 #
 if [ "${VERSION}" = "" ]; then
-	echo "$0 - Readline_Version"
-	echo "This will Create a Patch for Readline Readline_Version"
+  echo "$0 - Readline_Version"
+  echo "This will Create a Patch for Readline Readline_Version"
+  exit 255
 fi
 
 # Get the # of Patches
@@ -26,7 +27,7 @@
 # Download BASH Source
 #
 if ! [ -e readline-${VERSION}.tar.gz ]; then
-	wget ftp://ftp.cwru.edu/pub/bash/readline-${VERSION}.tar.gz
+  wget ftp://ftp.cwru.edu/pub/bash/readline-${VERSION}.tar.gz
 fi
 
 # Cleanup Directory
@@ -43,38 +44,38 @@
 mkdir /tmp/readline-${VERSION}
 COUNT=1
 while [ ${COUNT} -le ${FILES} ]; do
-	cd /tmp/readline-${VERSION}           
-	DLCOUNT="${COUNT}"
-	SKIPME=no
-	if [ "${COUNT}" -lt "100" ]; then
-		DLCOUNT="0${COUNT}"
-	fi
-	if [ "${COUNT}" -lt "10" ]; then
-		DLCOUNT="00${COUNT}"
-	fi
-	for skip in ${SKIPPATCH} ; do
-		if [ "${DLCOUNT}" = "$skip" ]; then
-			echo "Patch readline${VERSION2}-${DLCOUNT} skipped"
-			SKIPPED="${SKIPPED} ${DLCOUNT}"
-			SKIPME=yes
-		fi
-	done
-	if [ "${SKIPME}" != "yes" ]; then
-		if ! [ -e ${VERSION}.${DLCOUNT} ]; then
-			wget --quiet ${PATCHURL}/readline${VERSION2}-${DLCOUNT}
-		fi
-		cd ${CURRENTDIR}
-		patch --dry-run -s -f -Np0 -i /tmp/readline-${VERSION}/readline${VERSION2}-${DLCOUNT}
-		if [ "$?" = "0" ]; then
-			echo "Patch readline${VERSION2}-${DLCOUNT} applied"
-			patch -s -Np0 -i /tmp/readline-${VERSION}/readline${VERSION2}-${DLCOUNT}
-		else
-			echo "Patch readline${VERSION2}-${DLCOUNT} not applied"
-			rm -f /tmp/readline-${VERSION}/readline${VERSION2}-${DLCOUNT}
-			SKIPPED="${SKIPPED} ${DLCOUNT}"
-		fi
-	fi
-	COUNT=`expr ${COUNT} + 1`
+  cd /tmp/readline-${VERSION}           
+  DLCOUNT="${COUNT}"
+  SKIPME=no
+  if [ "${COUNT}" -lt "100" ]; then
+    DLCOUNT="0${COUNT}"
+  fi
+  if [ "${COUNT}" -lt "10" ]; then
+    DLCOUNT="00${COUNT}"
+  fi
+  for skip in ${SKIPPATCH} ; do
+    if [ "${DLCOUNT}" = "$skip" ]; then
+      echo "Patch readline${VERSION2}-${DLCOUNT} skipped"
+      SKIPPED="${SKIPPED} ${DLCOUNT}"
+      SKIPME=yes
+    fi
+  done
+  if [ "${SKIPME}" != "yes" ]; then
+    if ! [ -e ${VERSION}.${DLCOUNT} ]; then
+      wget --quiet ${PATCHURL}/readline${VERSION2}-${DLCOUNT}
+    fi
+    cd ${CURRENTDIR}
+    patch --dry-run -s -f -Np0 -i /tmp/readline-${VERSION}/readline${VERSION2}-${DLCOUNT}
+    if [ "$?" = "0" ]; then
+      echo "Patch readline${VERSION2}-${DLCOUNT} applied"
+      patch -s -Np0 -i /tmp/readline-${VERSION}/readline${VERSION2}-${DLCOUNT}
+    else
+      echo "Patch readline${VERSION2}-${DLCOUNT} not applied"
+      rm -f /tmp/readline-${VERSION}/readline${VERSION2}-${DLCOUNT}
+      SKIPPED="${SKIPPED} ${DLCOUNT}"
+     fi
+    fi
+    COUNT=`expr ${COUNT} + 1`
 done
 
 # Cleanup Directory
@@ -82,13 +83,13 @@
 # Cleanup Directory
 #
 for dir in $(find * -type d); do
-	cd /usr/src/readline-${VERSION}/${dir}
-	for file in $(find . -name '*~'); do
-		rm -f ${file}
-	done
-	for file in $(find . -name '*.orig'); do
-		rm -f ${file}
-	done
+  cd /usr/src/readline-${VERSION}/${dir}
+  for file in $(find . -name '*~'); do
+    rm -f ${file}
+  done
+  for file in $(find . -name '*.orig'); do
+    rm -f ${file}
+  done
 done
 cd /usr/src/readline-${VERSION}
 rm -f *~ *.orig
@@ -103,10 +104,9 @@
 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
 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-x.patch
+  echo "            ${SKIPPED}" >> readline-${VERSION}-branch_update-x.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."
-

Modified: trunk/scripts/patch/vim-patch.sh
==============================================================================
--- trunk/scripts/patch/vim-patch.sh (original)
+++ trunk/scripts/patch/vim-patch.sh Wed Jan 21 00:01:19 2009
@@ -8,8 +8,9 @@
 # Check Input
 #
 if [ "${VERSION}" = "" ]; then
-	echo "$0 - Vim_Version"
-	echo "This will Create a Patch for Vim Vim_Version"
+  echo "$0 - Vim_Version"
+  echo "This will Create a Patch for Vim Vim_Version"
+  exit 255
 fi
 
 # Get the # of Patches
@@ -26,7 +27,7 @@
 # Download VIM Source
 #
 if ! [ -e vim-${VERSION}.tar.bz2 ]; then
-	wget ftp://ftp.vim.org/pub/vim/unix/vim-${VERSION}.tar.bz2
+  wget ftp://ftp.vim.org/pub/vim/unix/vim-${VERSION}.tar.bz2
 fi
 
 # Cleanup Directory
@@ -43,50 +44,50 @@
 mkdir /tmp/vim-${VERSION}
 COUNT=1
 while [ ${COUNT} -le ${FILES} ]; do
-	cd /tmp/vim-${VERSION}            
-	DLCOUNT="${COUNT}"
-	SKIPME=no
-	if [ "${COUNT}" -lt "100" ]; then
-		DLCOUNT="0${COUNT}"
-	fi
-	if [ "${COUNT}" -lt "10" ]; then
-	DLCOUNT="00${COUNT}"
-	fi
-	for skip in ${SKIPPATCH} ; do
-		if [ "${DLCOUNT}" = "${skip}" ]; then
-			echo "Patch ${VERSION}.${DLCOUNT} skipped"
-			SKIPPED="${SKIPPED} ${DLCOUNT}"
-			SKIPME=yes
-		fi
-	done
-	if [ "${SKIPME}" != "yes" ]; then
-	if ! [ -e ${VERSION}.${DLCOUNT} ]; then
-		wget --quiet $PATCHURL/${VERSION}.${DLCOUNT}
-	fi
-		cd $CURRENTDIR
-		patch --dry-run -s -f -Np0 -i /tmp/vim-${VERSION}/${VERSION}.${DLCOUNT}
-		if [ "$?" = "0" ]; then
-		echo "Patch ${VERSION}.${DLCOUNT} applied"
-			patch -s -Np0 -i /tmp/vim-${VERSION}/${VERSION}.${DLCOUNT}
-		else
-			echo "Patch ${VERSION}.${DLCOUNT} not applied"
-			rm -f /tmp/vim-${VERSION}/${VERSION}.${DLCOUNT}
-			SKIPPED="${SKIPPED} ${DLCOUNT}"
-		fi
-	fi
-	COUNT=`expr ${COUNT} + 1`
+  cd /tmp/vim-${VERSION}            
+  DLCOUNT="${COUNT}"
+  SKIPME=no
+  if [ "${COUNT}" -lt "100" ]; then
+    DLCOUNT="0${COUNT}"
+  fi
+  if [ "${COUNT}" -lt "10" ]; then
+    DLCOUNT="00${COUNT}"
+  fi
+  for skip in ${SKIPPATCH} ; do
+    if [ "${DLCOUNT}" = "${skip}" ]; then
+      echo "Patch ${VERSION}.${DLCOUNT} skipped"
+      SKIPPED="${SKIPPED} ${DLCOUNT}"
+      SKIPME=yes
+    fi
+  done
+  if [ "${SKIPME}" != "yes" ]; then
+    if ! [ -e ${VERSION}.${DLCOUNT} ]; then
+      wget --quiet $PATCHURL/${VERSION}.${DLCOUNT}
+    fi
+    cd $CURRENTDIR
+    patch --dry-run -s -f -Np0 -i /tmp/vim-${VERSION}/${VERSION}.${DLCOUNT}
+    if [ "$?" = "0" ]; then
+      echo "Patch ${VERSION}.${DLCOUNT} applied"
+      patch -s -Np0 -i /tmp/vim-${VERSION}/${VERSION}.${DLCOUNT}
+    else
+      echo "Patch ${VERSION}.${DLCOUNT} not applied"
+      rm -f /tmp/vim-${VERSION}/${VERSION}.${DLCOUNT}
+      SKIPPED="${SKIPPED} ${DLCOUNT}"
+    fi
+   fi
+   COUNT=`expr ${COUNT} + 1`
 done
 
 # Cleanup Directory
 #
 for dir in $(find * -type d); do
-	cd /usr/src/vim${SERIES}
-	for file in $(find . -name '*~'); do
-		rm -f ${file}
-	done
-	for file in $(find . -name '*.orig'); do
-		rm -f ${file}
-	done
+  cd /usr/src/vim${SERIES}
+  for file in $(find . -name '*~'); do
+    rm -f ${file}
+  done
+  for file in $(find . -name '*.orig'); do
+    rm -f ${file}
+  done
 done
 cd /usr/src/vim${SERIES}
 rm -f *~ *.orig
@@ -101,10 +102,9 @@
 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
 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-x.patch
+  echo "            ${SKIPPED}" >> vim-${VERSION}-branch_update-x.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."
-




More information about the Clfs-commits mailing list