Changeset 9676bac for scripts/patch/readline-patch.sh
- Timestamp:
- Jan 20, 2009, 4:01:19 PM (14 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
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note: See TracChangeset
for help on using the changeset viewer.