Changes in scripts/patch/readline-patch.sh [d8a9d8b:10b98b1]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
scripts/patch/readline-patch.sh
rd8a9d8b r10b98b1 16 16 # Get the # of Patches 17 17 # 18 cd ~/tmp18 cd /usr/src 19 19 wget ftp://ftp.cwru.edu/pub/bash/readline-${VERSION}-patches/ --no-remove-listing 20 20 VERSION2=$(echo ${VERSION} | sed -e 's/\.//g') … … 27 27 # Download Readline Source 28 28 # 29 cd ~/tmp30 29 if ! [ -e readline-${VERSION}.tar.gz ]; then 31 30 wget ftp://ftp.cwru.edu/pub/bash/readline-${VERSION}.tar.gz … … 34 33 # Set Patch Number 35 34 # 36 cd ~/tmp35 cd /usr/src 37 36 wget http://svn.cross-lfs.org/svn/repos/cross-lfs/trunk/patches/ --no-remove-listing 38 37 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) … … 42 41 # Cleanup Directory 43 42 # 44 cd ~/tmp45 43 rm -rf readline-${VERSION} readline-${VERSION}.orig 46 44 tar xvf readline-${VERSION}.tar.gz 47 45 cp -ar readline-${VERSION} readline-${VERSION}.orig 46 cd readline-${VERSION} 47 CURRENTDIR=$(pwd -P) 48 48 49 49 # Download and Apply Patches 50 50 # 51 install -d ~/tmp/readline-${VERSION}-patches52 cd ~/tmp/readline-${VERSION}53 CURRENTDIR=$(pwd -P)54 51 PATCHURL=ftp://ftp.cwru.edu/pub/bash/readline-${VERSION}-patches 55 52 mkdir /tmp/readline-${VERSION} 56 53 COUNT=1 57 54 while [ ${COUNT} -le ${FILES} ]; do 58 cd ~/tmp/readline-${VERSION}55 cd /tmp/readline-${VERSION} 59 56 DLCOUNT="${COUNT}" 60 57 SKIPME=no … … 74 71 if [ "${SKIPME}" != "yes" ]; then 75 72 if ! [ -e ${VERSION}.${DLCOUNT} ]; then 76 cd ~/tmp/readline-${VERSION}-patches77 73 wget --quiet ${PATCHURL}/readline${VERSION2}-${DLCOUNT} 78 74 fi 79 75 cd ${CURRENTDIR} 80 patch --dry-run -s -f -Np0 -i ~/tmp/readline-${VERSION}-patches/readline${VERSION2}-${DLCOUNT}76 patch --dry-run -s -f -Np0 -i /tmp/readline-${VERSION}/readline${VERSION2}-${DLCOUNT} 81 77 if [ "$?" = "0" ]; then 82 78 echo "Patch readline${VERSION2}-${DLCOUNT} applied" 83 patch -s -Np0 -i ~/tmp/readline-${VERSION}-patches/readline${VERSION2}-${DLCOUNT}79 patch -s -Np0 -i /tmp/readline-${VERSION}/readline${VERSION2}-${DLCOUNT} 84 80 else 85 81 echo "Patch readline${VERSION2}-${DLCOUNT} not applied" 86 rm -f ~/tmp/readline-${VERSION}-patches/readline${VERSION2}-${DLCOUNT}82 rm -f /tmp/readline-${VERSION}/readline${VERSION2}-${DLCOUNT} 87 83 SKIPPED="${SKIPPED} ${DLCOUNT}" 88 84 fi … … 96 92 # 97 93 for dir in $(find * -type d); do 98 cd ~/tmp/readline-${VERSION}/${dir}94 cd /usr/src/readline-${VERSION}/${dir} 99 95 for file in $(find . -name '*~'); do 100 96 rm -f ${file} … … 104 100 done 105 101 done 106 cd ~/tmp/readline-${VERSION}102 cd /usr/src/readline-${VERSION} 107 103 rm -f *~ *.orig 108 104 109 105 # Create Patch 110 106 # 111 cd ~/tmp112 echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > ~/patches/readline-${VERSION}-branch_update-${PATCH_NUM}.patch113 echo "Date: `date +%m-%d-%Y`" >> ~/patches/readline-${VERSION}-branch_update-${PATCH_NUM}.patch114 echo "Initial Package Version: ${VERSION}" >> ~/patches/readline-${VERSION}-branch_update-${PATCH_NUM}.patch115 echo "Origin: Upstream" >> ~/patches/readline-${VERSION}-branch_update-${PATCH_NUM}.patch116 echo "Upstream Status: Applied" >> ~/patches/readline-${VERSION}-branch_update-${PATCH_NUM}.patch117 echo "Description: Contains all upstream patches up to ${VERSION}-${FILES}" >> ~/patches/readline-${VERSION}-branch_update-${PATCH_NUM}.patch107 cd /usr/src 108 echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > readline-${VERSION}-branch_update-${PATCH_NUM}.patch 109 echo "Date: `date +%m-%d-%Y`" >> readline-${VERSION}-branch_update-${PATCH_NUM}.patch 110 echo "Initial Package Version: ${VERSION}" >> readline-${VERSION}-branch_update-${PATCH_NUM}.patch 111 echo "Origin: Upstream" >> readline-${VERSION}-branch_update-${PATCH_NUM}.patch 112 echo "Upstream Status: Applied" >> readline-${VERSION}-branch_update-${PATCH_NUM}.patch 113 echo "Description: Contains all upstream patches up to ${VERSION}-${FILES}" >> readline-${VERSION}-branch_update-${PATCH_NUM}.patch 118 114 if [ -n "${SKIPPED}" ]; then 119 echo " Thee following patches were skipped" >> ~/patches/readline-${VERSION}-branch_update-${PATCH_NUM}.patch120 echo " ${SKIPPED}" >> ~/patches/readline-${VERSION}-branch_update-${PATCH_NUM}.patch115 echo " Thee following patches were skipped" >> readline-${VERSION}-branch_update-${PATCH_NUM}.patch 116 echo " ${SKIPPED}" >> readline-${VERSION}-branch_update-${PATCH_NUM}.patch 121 117 fi 122 echo "" >> ~/patches/readline-${VERSION}-branch_update-${PATCH_NUM}.patch 123 diff -Naur readline-${VERSION}.orig readline-${VERSION} >> ~/patches/readline-${VERSION}-branch_update-${PATCH_NUM}.patch 124 echo "Created ~/patches/readline-${VERSION}-branch_update-${PATCH_NUM}.patch." 125 126 # Cleanup Directory 127 # 128 cd ~/tmp 129 rm -rf readline-${VERSION} readline-${VERSION}.orig 118 echo "" >> readline-${VERSION}-branch_update-${PATCH_NUM}.patch 119 diff -Naur readline-${VERSION}.orig readline-${VERSION} >> readline-${VERSION}-branch_update-${PATCH_NUM}.patch 120 echo "Created /usr/src/readline-${VERSION}-branch_update-${PATCH_NUM}.patch."
Note:
See TracChangeset
for help on using the changeset viewer.