Changeset 9676bac for scripts/patch
- Timestamp:
- Jan 20, 2009, 4:01:19 PM (16 years ago)
- Branches:
- clfs-1.2, clfs-2.1, clfs-3.0.0-systemd, clfs-3.0.0-sysvinit, master, systemd, sysvinit
- Children:
- 550b73d
- Parents:
- d8b9d99
- Location:
- scripts/patch
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
scripts/patch/bash-patch.sh
rd8b9d99 r9676bac 9 9 # 10 10 if [ "${VERSION}" = "" ]; then 11 echo "$0 - Bash_Version" 12 echo "This will Create a Patch for Bash Bash_Version" 11 echo "$0 - Bash_Version" 12 echo "This will Create a Patch for Bash Bash_Version" 13 exit 255 13 14 fi 14 15 … … 27 28 # 28 29 if ! [ -e bash-${VERSION}.tar.gz ]; then 29 30 wget ftp://ftp.cwru.edu/pub/bash/bash-${VERSION}.tar.gz 30 31 fi 31 32 … … 44 45 COUNT=1 45 46 while [ ${COUNT} -le ${FILES} ]; do 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 47 cd /tmp/bash-${VERSION} 48 DLCOUNT="${COUNT}" 49 SKIPME=no 50 if [ "${COUNT}" -lt "100" ]; then 51 DLCOUNT="0${COUNT}" 52 fi 53 if [ "${COUNT}" -lt "10" ]; then 54 DLCOUNT="00${COUNT}" 55 fi 56 for skip in ${SKIPPATCH} ; do 57 if [ "${DLCOUNT}" = "$skip" ]; then 58 echo "Patch bash${VERSION2}-${DLCOUNT} skipped" 59 SKIPPED="${SKIPPED} ${DLCOUNT}" 60 SKIPME=yes 61 fi 62 done 63 if [ "${SKIPME}" != "yes" ]; then 64 if ! [ -e ${VERSION}.${DLCOUNT} ]; then 65 wget --quiet ${PATCHURL}/bash${VERSION2}-${DLCOUNT} 66 fi 67 cd ${CURRENTDIR} 68 patch --dry-run -s -f -Np0 -i /tmp/bash-${VERSION}/bash${VERSION2}-${DLCOUNT} 69 if [ "$?" = "0" ]; then 70 echo "Patch bash${VERSION2}-${DLCOUNT} applied" 71 patch -s -Np0 -i /tmp/bash-${VERSION}/bash${VERSION2}-${DLCOUNT} 72 else 73 echo "Patch bash${VERSION2}-${DLCOUNT} not applied" 74 rm -f /tmp/bash-${VERSION}/bash${VERSION2}-${DLCOUNT} 75 SKIPPED="${SKIPPED} ${DLCOUNT}" 76 fi 77 fi 78 COUNT=`expr ${COUNT} + 1` 78 79 done 79 80 … … 82 83 83 84 for dir in $(find * -type d); do 84 85 86 87 88 89 90 85 cd /usr/src/bash-${VERSION}/${dir} 86 for file in $(find . -name '*~'); do 87 rm -f ${file} 88 done 89 for file in $(find . -name '*.orig'); do 90 rm -f ${file} 91 done 91 92 done 92 93 cd /usr/src/bash-${VERSION} … … 103 104 echo "Description: Contains all upstream patches up to ${VERSION}-${FILES}" >> bash-${VERSION}-branch_update-x.patch 104 105 if [ -n "${SKIPPED}" ]; then 105 106 106 echo " The following patches were skipped" >> bash-${VERSION}-branch_update-x.patch 107 echo " ${SKIPPED}" >> bash-${VERSION}-branch_update-x.patch 107 108 fi 108 109 echo "" >> bash-${VERSION}-branch_update-x.patch 109 110 diff -Naur bash-${VERSION}.orig bash-${VERSION} >> bash-${VERSION}-branch_update-x.patch 110 111 echo "Created /usr/src/bash-${VERSION}-branch_update-x.patch." 111 -
scripts/patch/binutils-patch.sh
rd8b9d99 r9676bac 9 9 # 10 10 if [ "${VERSION}" = "" ]; then 11 echo "$0 - Binutils_Version" 12 echo "This will Create a Patch for Binutils Binutils_Version" 11 echo "$0 - Binutils_Version" 12 echo "This will Create a Patch for Binutils Binutils_Version" 13 exit 255 13 14 fi 14 15 … … 17 18 cd /usr/src 18 19 if ! [ -e binutils-${VERSION}.tar.bz2 ]; then 19 20 wget ftp://ftp.gnu.org/gnu/binutils/binutils-${VERSION}.tar.bz2 20 21 fi 21 22 … … 38 39 DIRS="binutils-${VERSION} binutils-${VERSION}.orig" 39 40 for DIRECTORY in ${DIRS}; do 40 cd /usr/src/${DIRECTORY}41 42 43 44 45 46 47 41 cd /usr/src/${DIRECTORY} 42 FILE_LIST=".cvsignore *.gmo" 43 for files in ${FILE_LIST}; do 44 REMOVE=$(find * -name ${files}) 45 for file in $REMOVE; do 46 rm -f ${file} 47 done 48 done 48 49 49 50 51 52 53 54 50 REMOVE=".cvsignore MAINTAINERS COPYING.LIBGLOSS COPYING.NEWLIB README-maintainer-mode depcomp 51 ChangeLog compile ltgcc.m4 lt~obsolete.m4 etc/ChangeLog etc/add-log.el etc/add-log.vi" 52 for file in $REMOVE; do 53 rm -f ${file} 54 done 55 cd .. 55 56 done 56 57 … … 58 59 # 59 60 for dir in $(find * -type d); do 60 61 62 63 64 65 66 61 cd /usr/src/binutils-${VERSION} 62 for file in $(find . -name '*~'); do 63 rm -f ${file} 64 done 65 for file in $(find . -name '*.orig'); do 66 rm -f ${file} 67 done 67 68 done 68 69 cd /usr/src/binutils-${VERSION} … … 89 90 diff -Naur binutils-${VERSION}.orig binutils-${VERSION} >> binutils-${VERSION}-branch_update-x.patch 90 91 echo "Created /usr/src/binutils-${VERSION}-branch_update-x.patch." 91 -
scripts/patch/gcc-patch.sh
rd8b9d99 r9676bac 9 9 # 10 10 if [ "${VERSION}" = "" ]; then 11 echo "$0 - GCC_Version" 12 echo "This will Create a Patch for GCC GCC_Version" 11 echo "$0 - GCC_Version" 12 echo "This will Create a Patch for GCC GCC_Version" 13 exit 255 13 14 fi 14 15 … … 17 18 cd /usr/src 18 19 if ! [ -e gcc-${VERSION}.tar.bz2 ]; then 19 20 wget ftp://ftp.gnu.org/gnu/gcc/gcc-${VERSION}/gcc-${VERSION}.tar.bz2 20 21 fi 21 22 … … 38 39 DIRS="gcc-${VERSION} gcc-${VERSION}.orig" 39 40 for DIRECTORY in ${DIRS}; do 40 41 42 43 44 45 46 47 48 49 50 51 52 41 cd ${DIRECTORY} 42 REMOVE="ABOUT-NLS COPYING COPYING.LIB ChangeLog ChangeLog.tree-ssa MAINTAINERS Makefile.def 43 Makefile.in Makefile.tpl README README.SCO boehm-gc/ChangeLog BUGS FAQ LAST_UPDATED 44 MD5SUMS NEWS bugs.html faq.html gcc/BASE-VER gcc/DATESTAMP gcc/DEV-PHASE gcc/c-parse.c 45 gcc/gengtype-lex.c gcc/c-parse.y gcc/gengtype-yacc.c gcc/gengtype-yacc.h gcc/f/BUGS gcc/f/NEWS 46 gcc/java/parse-scan.c gcc/java/parse.c gcc/objc/objc-parse.c gcc/objc/objc-parse.y" 47 for file in ${REMOVE}; do 48 rm -f $file 49 done 50 rm -rf INSTALL 51 rm -f fastjar/*.{1,info} gcc/doc/*.{1,info,7} gcc/fortran/*.{1,info,7} 52 rm -f gcc/po/*.{gmo,po} libcpp/po/*.{gmo,po} libgomp/*.{1,info,7} 53 cd .. 53 54 done 54 55 … … 66 67 diff -Naur gcc-${VERSION}.orig gcc-${VERSION} >> gcc-${VERSION}-branch_update-x.patch 67 68 echo "Created /usr/src/gcc-${VERSION}-branch_update-x.patch." 68 69 -
scripts/patch/gcc-specs-patch.sh
rd8b9d99 r9676bac 9 9 # 10 10 if [ "${VERSION}" = "" ]; then 11 echo "$0 - GCC_Version" 12 echo "This will Create a Patch for GCC Specs GCC_Version" 11 echo "$0 - GCC_Version" 12 echo "This will Create a Patch for GCC Specs GCC_Version" 13 exit 255 13 14 fi 14 15 … … 17 18 cd /usr/src 18 19 if ! [ -e gcc-${VERSION}.tar.bz2 ]; then 19 20 wget ftp://ftp.gnu.org/gnu/gcc/gcc-${VERSION}/gcc-${VERSION}.tar.bz2 20 21 fi 21 22 … … 31 32 cd /usr/src/gcc-${VERSION} 32 33 for file in $(find gcc/config -name "*.h"); do 33 34 35 36 37 38 39 40 41 42 34 if [ "$(echo ${file} | grep -c bsd)" = "0" ]; then 35 if [ "$(cat ${file} | grep -c DYNAMIC_LINKER)" != "0" ]; then 36 echo "Modifying ${file}..." 37 sed -i '/DYNAMIC_LINKER/s@"/lib@"/tools/lib@' ${file} 38 fi 39 if [ "$(cat ${file} | grep -c DYNAMIC_LINKER)" != "0" ]; then 40 echo "Modifying ${file}..." 41 sed -i '/-dynamic-linker/s@ /lib@ /tools/lib@' ${file} 42 fi 43 fi 43 44 done 44 45 -
scripts/patch/ncurses-patch.sh
rd8b9d99 r9676bac 9 9 # 10 10 if [ "${VERSION}" = "" ]; then 11 echo "$0 - Ncurses_Version" 12 echo "This will Create a Patch for Ncurses Ncurses_Version" 11 echo "$0 - Ncurses_Version" 12 echo "This will Create a Patch for Ncurses Ncurses_Version" 13 exit 255 13 14 fi 14 15 … … 26 27 # 27 28 if ! [ -e ncurses-${VERSION}.tar.gz ]; then 28 29 wget ftp://invisible-island.net/ncurses/ncurses-${VERSION}.tar.gz 29 30 fi 30 31 … … 42 43 cd /tmp/ncurses-${VERSION} 43 44 if [ "${ROLLUP}" != "" ]; then 44 45 46 47 48 49 50 51 45 echo "Getting Rollup ${ROLLUP} Patch..." 46 wget --quiet ftp://invisible-island.net/ncurses/${VERSION}/${ROLLUP} 47 cd ${CURRENTDIR} 48 echo "Applying Rollup ${ROLLUP} Patch..." 49 cp /tmp/ncurses-${VERSION}/${ROLLUP} ${CURRENTDIR}/${ROLLUP} 50 bunzip2 ${ROLLUP} 51 ROLLUP2=$(echo ${ROLLUP} | sed -e 's/.bz2//g') 52 sh ${ROLLUP2} 52 53 fi 53 54 … … 55 56 # 56 57 for file in ${FILES}; do 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 58 if [ "${ROLLPATCH}" != "" ]; then 59 TEST=$(echo ${file} | grep -c ${ROLLPATCH}) 60 else 61 TEST=0 62 fi 63 if [ "${TEST}" = "0" ]; then 64 cd /tmp/ncurses-${VERSION} 65 echo "Getting Patch ${file}..." 66 wget --quiet ftp://invisible-island.net/ncurses/${VERSION}/${file} 67 cd ${CURRENTDIR} 68 gunzip -c /tmp/ncurses-${VERSION}/${file} | patch --dry-run -s -f -Np1 69 if [ "$?" = "0" ]; then 70 echo "Apply Patch ${file}..." 71 gunzip -c /tmp/ncurses-${VERSION}/${file} | patch -Np1 72 LASTFILE=$(echo ${file} | cut -f2 -d. | cut -f2 -d-) 73 fi 74 fi 74 75 done 75 76 … … 79 80 # 80 81 for dir in $(find * -type d); do 81 82 83 84 85 86 87 82 cd /usr/src/ncurses-${VERSION}/${dir} 83 for file in $(find . -name '*~'); do 84 rm -f ${file} 85 done 86 for file in $(find . -name '*.orig'); do 87 rm -f ${file} 88 done 88 89 done 89 90 cd /usr/src/ncurses-${VERSION} -
scripts/patch/readline-patch.sh
rd8b9d99 r9676bac 9 9 # 10 10 if [ "${VERSION}" = "" ]; then 11 echo "$0 - Readline_Version" 12 echo "This will Create a Patch for Readline Readline_Version" 11 echo "$0 - Readline_Version" 12 echo "This will Create a Patch for Readline Readline_Version" 13 exit 255 13 14 fi 14 15 … … 27 28 # 28 29 if ! [ -e readline-${VERSION}.tar.gz ]; then 29 30 wget ftp://ftp.cwru.edu/pub/bash/readline-${VERSION}.tar.gz 30 31 fi 31 32 … … 44 45 COUNT=1 45 46 while [ ${COUNT} -le ${FILES} ]; do 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 47 cd /tmp/readline-${VERSION} 48 DLCOUNT="${COUNT}" 49 SKIPME=no 50 if [ "${COUNT}" -lt "100" ]; then 51 DLCOUNT="0${COUNT}" 52 fi 53 if [ "${COUNT}" -lt "10" ]; then 54 DLCOUNT="00${COUNT}" 55 fi 56 for skip in ${SKIPPATCH} ; do 57 if [ "${DLCOUNT}" = "$skip" ]; then 58 echo "Patch readline${VERSION2}-${DLCOUNT} skipped" 59 SKIPPED="${SKIPPED} ${DLCOUNT}" 60 SKIPME=yes 61 fi 62 done 63 if [ "${SKIPME}" != "yes" ]; then 64 if ! [ -e ${VERSION}.${DLCOUNT} ]; then 65 wget --quiet ${PATCHURL}/readline${VERSION2}-${DLCOUNT} 66 fi 67 cd ${CURRENTDIR} 68 patch --dry-run -s -f -Np0 -i /tmp/readline-${VERSION}/readline${VERSION2}-${DLCOUNT} 69 if [ "$?" = "0" ]; then 70 echo "Patch readline${VERSION2}-${DLCOUNT} applied" 71 patch -s -Np0 -i /tmp/readline-${VERSION}/readline${VERSION2}-${DLCOUNT} 72 else 73 echo "Patch readline${VERSION2}-${DLCOUNT} not applied" 74 rm -f /tmp/readline-${VERSION}/readline${VERSION2}-${DLCOUNT} 75 SKIPPED="${SKIPPED} ${DLCOUNT}" 76 fi 77 fi 78 COUNT=`expr ${COUNT} + 1` 78 79 done 79 80 … … 83 84 # 84 85 for dir in $(find * -type d); do 85 86 87 88 89 90 91 86 cd /usr/src/readline-${VERSION}/${dir} 87 for file in $(find . -name '*~'); do 88 rm -f ${file} 89 done 90 for file in $(find . -name '*.orig'); do 91 rm -f ${file} 92 done 92 93 done 93 94 cd /usr/src/readline-${VERSION} … … 104 105 echo "Description: Contains all upstream patches up to ${VERSION}-${FILES}" >> readline-${VERSION}-branch_update-x.patch 105 106 if [ -n "${SKIPPED}" ]; then 106 107 107 echo " Thee following patches were skipped" >> readline-${VERSION}-branch_update-x.patch 108 echo " ${SKIPPED}" >> readline-${VERSION}-branch_update-x.patch 108 109 fi 109 110 echo "" >> readline-${VERSION}-branch_update-x.patch 110 111 diff -Naur readline-${VERSION}.orig readline-${VERSION} >> readline-${VERSION}-branch_update-x.patch 111 112 echo "Created /usr/src/readline-${VERSION}-branch_update-x.patch." 112 -
scripts/patch/vim-patch.sh
rd8b9d99 r9676bac 9 9 # 10 10 if [ "${VERSION}" = "" ]; then 11 echo "$0 - Vim_Version" 12 echo "This will Create a Patch for Vim Vim_Version" 11 echo "$0 - Vim_Version" 12 echo "This will Create a Patch for Vim Vim_Version" 13 exit 255 13 14 fi 14 15 … … 27 28 # 28 29 if ! [ -e vim-${VERSION}.tar.bz2 ]; then 29 30 wget ftp://ftp.vim.org/pub/vim/unix/vim-${VERSION}.tar.bz2 30 31 fi 31 32 … … 44 45 COUNT=1 45 46 while [ ${COUNT} -le ${FILES} ]; do 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 47 cd /tmp/vim-${VERSION} 48 DLCOUNT="${COUNT}" 49 SKIPME=no 50 if [ "${COUNT}" -lt "100" ]; then 51 DLCOUNT="0${COUNT}" 52 fi 53 if [ "${COUNT}" -lt "10" ]; then 54 DLCOUNT="00${COUNT}" 55 fi 56 for skip in ${SKIPPATCH} ; do 57 if [ "${DLCOUNT}" = "${skip}" ]; then 58 echo "Patch ${VERSION}.${DLCOUNT} skipped" 59 SKIPPED="${SKIPPED} ${DLCOUNT}" 60 SKIPME=yes 61 fi 62 done 63 if [ "${SKIPME}" != "yes" ]; then 64 if ! [ -e ${VERSION}.${DLCOUNT} ]; then 65 wget --quiet $PATCHURL/${VERSION}.${DLCOUNT} 66 fi 67 cd $CURRENTDIR 68 patch --dry-run -s -f -Np0 -i /tmp/vim-${VERSION}/${VERSION}.${DLCOUNT} 69 if [ "$?" = "0" ]; then 70 echo "Patch ${VERSION}.${DLCOUNT} applied" 71 patch -s -Np0 -i /tmp/vim-${VERSION}/${VERSION}.${DLCOUNT} 72 else 73 echo "Patch ${VERSION}.${DLCOUNT} not applied" 74 rm -f /tmp/vim-${VERSION}/${VERSION}.${DLCOUNT} 75 SKIPPED="${SKIPPED} ${DLCOUNT}" 76 fi 77 fi 78 COUNT=`expr ${COUNT} + 1` 78 79 done 79 80 … … 81 82 # 82 83 for dir in $(find * -type d); do 83 84 85 86 87 88 89 84 cd /usr/src/vim${SERIES} 85 for file in $(find . -name '*~'); do 86 rm -f ${file} 87 done 88 for file in $(find . -name '*.orig'); do 89 rm -f ${file} 90 done 90 91 done 91 92 cd /usr/src/vim${SERIES} … … 102 103 echo "Description: Contains all upstream patches up to ${VERSION}.${FILES}" >> vim-${VERSION}-branch_update-x.patch 103 104 if [ -n "${SKIPPED}" ]; then 104 105 105 echo " The following patches were skipped" >> vim-${VERSION}-branch_update-x.patch 106 echo " ${SKIPPED}" >> vim-${VERSION}-branch_update-x.patch 106 107 fi 107 108 echo "" >> vim-${VERSION}-branch_update-x.patch 108 109 diff -Naur vim${SERIES}.orig vim${SERIES} >> vim-${VERSION}-branch_update-x.patch 109 110 echo "Created /usr/src/vim-${VERSION}-branch_update-x.patch." 110
Note:
See TracChangeset
for help on using the changeset viewer.