Changes in scripts/patch/ncurses-patch.sh [d8a9d8b:c7ef534]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
scripts/patch/ncurses-patch.sh
rd8a9d8b rc7ef534 16 16 # Get Patch Names 17 17 # 18 cd ~/tmp18 cd /usr/src 19 19 wget ftp://invisible-island.net/ncurses/${VERSION}/ --no-remove-listing 20 20 ROLLUP=$(cat index.html | grep bz2 | cut -f2 -d'>' | cut -f1 -d'<' | tail -n 1) … … 26 26 # Download Ncurses Source 27 27 # 28 cd ~/tmp29 28 if ! [ -e ncurses-${VERSION}.tar.gz ]; then 30 29 wget ftp://invisible-island.net/ncurses/ncurses-${VERSION}.tar.gz … … 33 32 # Set Patch Number 34 33 # 35 cd ~/tmp34 cd /usr/src 36 35 wget http://svn.cross-lfs.org/svn/repos/cross-lfs/trunk/patches/ --no-remove-listing 37 36 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) … … 41 40 # Cleanup Directory 42 41 # 43 cd ~/tmp44 42 rm -rf ncurses-${VERSION} ncurses-${VERSION}.orig 45 43 tar xvf ncurses-${VERSION}.tar.gz 46 44 cp -ar ncurses-${VERSION} ncurses-${VERSION}.orig 45 cd ncurses-${VERSION} 47 46 48 47 # Download and Apply Rollup Patch 49 48 # 50 cd ~/tmp/ncurses-${VERSION}51 49 CURRENTDIR=$(pwd -P) 52 mkdir ~/tmp/ncurses-${VERSION}-patches53 cd ~/tmp/ncurses-${VERSION}50 mkdir /tmp/ncurses-${VERSION} 51 cd /tmp/ncurses-${VERSION} 54 52 if [ "${ROLLUP}" != "" ]; then 55 53 echo "Getting Rollup ${ROLLUP} Patch..." 56 cd ~/tmp/ncurses-${VERSION}-patches57 54 wget --quiet ftp://invisible-island.net/ncurses/${VERSION}/${ROLLUP} 58 55 cd ${CURRENTDIR} 59 56 echo "Applying Rollup ${ROLLUP} Patch..." 60 cp ~/tmp/ncurses-${VERSION}-patches/${ROLLUP} ${CURRENTDIR}/${ROLLUP}57 cp /tmp/ncurses-${VERSION}/${ROLLUP} ${CURRENTDIR}/${ROLLUP} 61 58 bunzip2 ${ROLLUP} 62 59 ROLLUP2=$(echo ${ROLLUP} | sed -e 's/.bz2//g') … … 66 63 # Download and Apply Patches 67 64 # 68 install -d ~/tmp/ncurses-${VERSION}-patches69 cd ~/tmp/ncurses-${VERSION}70 CURRENTDIR=$(pwd -P)71 65 for file in ${FILES}; do 72 66 if [ "${ROLLPATCH}" != "" ]; then … … 76 70 fi 77 71 if [ "${TEST}" = "0" ]; then 78 cd ~/tmp/ncurses-${VERSION}-patches72 cd /tmp/ncurses-${VERSION} 79 73 echo "Getting Patch ${file}..." 80 74 wget --quiet ftp://invisible-island.net/ncurses/${VERSION}/${file} 81 75 cd ${CURRENTDIR} 82 gunzip -c ~/tmp/ncurses-${VERSION}-patches/${file} | patch --dry-run -s -f -Np176 gunzip -c /tmp/ncurses-${VERSION}/${file} | patch --dry-run -s -f -Np1 83 77 if [ "$?" = "0" ]; then 84 78 echo "Apply Patch ${file}..." 85 gunzip -c ~/tmp/ncurses-${VERSION}-patches/${file} | patch -Np179 gunzip -c /tmp/ncurses-${VERSION}/${file} | patch -Np1 86 80 LASTFILE=$(echo ${file} | cut -f2 -d. | cut -f2 -d-) 87 81 fi … … 91 85 # Cleanup Directory 92 86 # 93 cd ~/tmp 94 cd ncurses-${VERSION} 87 # Cleanup Directory 88 # 95 89 for dir in $(find * -type d); do 96 cd ~/tmp/ncurses-${VERSION}/${dir}90 cd /usr/src/ncurses-${VERSION}/${dir} 97 91 for file in $(find . -name '*~'); do 98 92 rm -f ${file} … … 102 96 done 103 97 done 104 cd ~/tmp/ncurses-${VERSION}98 cd /usr/src/ncurses-${VERSION} 105 99 rm -f *~ *.orig 106 100 107 101 # Create Patch 108 102 # 109 cd ~/tmp 110 echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > ~/patches/ncurses-${VERSION}-branch_update-${PATCH_NUM}.patch 111 echo "Date: `date +%m-%d-%Y`" >> ~/patches/ncurses-${VERSION}-branch_update-${PATCH_NUM}.patch 112 echo "Initial Package Version: ${VERSION}" >> ~/patches/ncurses-${VERSION}-branch_update-${PATCH_NUM}.patch 113 echo "Origin: Upstream" >> ~/patches/ncurses-${VERSION}-branch_update-${PATCH_NUM}.patch 114 echo "Upstream Status: Applied" >> ~/patches/ncurses-${VERSION}-branch_update-${PATCH_NUM}.patch 115 echo "Description: This is a branch update for NCurses-${VERSION}, and should be" >> ~/patches/ncurses-${VERSION}-branch_update-${PATCH_NUM}.patch 116 echo " rechecked periodically. This patch covers up to ${VERSION}-${LASTFILE}." >> ~/patches/ncurses-${VERSION}-branch_update-${PATCH_NUM}.patch 117 echo "" >> ~/patches/ncurses-${VERSION}-branch_update-${PATCH_NUM}.patch 118 diff -Naur ncurses-${VERSION}.orig ncurses-${VERSION} >> ~/patches/ncurses-${VERSION}-branch_update-${PATCH_NUM}.patch 119 echo "Created ~/patches/ncurses-${VERSION}-branch_update-${PATCH_NUM}.patch." 120 121 # Cleanup Directory 122 # 123 cd ~/tmp 124 rm -rf ncurses-${VERSION} ncurses-${VERSION}.orig 103 cd /usr/src 104 echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > ncurses-${VERSION}-branch_update-${PATCH_NUM}.patch 105 echo "Date: `date +%m-%d-%Y`" >> ncurses-${VERSION}-branch_update-${PATCH_NUM}.patch 106 echo "Initial Package Version: ${VERSION}" >> ncurses-${VERSION}-branch_update-${PATCH_NUM}.patch 107 echo "Origin: Upstream" >> ncurses-${VERSION}-branch_update-${PATCH_NUM}.patch 108 echo "Upstream Status: Applied" >> ncurses-${VERSION}-branch_update-${PATCH_NUM}.patch 109 echo "Description: This is a branch update for NCurses-${VERSION}, and should be" >> ncurses-${VERSION}-branch_update-${PATCH_NUM}.patch 110 echo " rechecked periodically. This patch covers up to ${VERSION}-${LASTFILE}." >> ncurses-${VERSION}-branch_update-${PATCH_NUM}.patch 111 echo "" >> ncurses-${VERSION}-branch_update-${PATCH_NUM}.patch 112 diff -Naur ncurses-${VERSION}.orig ncurses-${VERSION} >> ncurses-${VERSION}-branch_update-${PATCH_NUM}.patch 113 echo "Created /usr/src/ncurses-${VERSION}-branch_update-${PATCH_NUM}.patch."
Note:
See TracChangeset
for help on using the changeset viewer.