Changes in scripts/patch/vim-patch.sh [d8a9d8b:54f612f]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
scripts/patch/vim-patch.sh
rd8a9d8b r54f612f 16 16 # Get the # of Patches 17 17 # 18 cd ~/tmp18 cd /usr/src 19 19 wget ftp://ftp.vim.org/pub/vim/patches/${VERSION}/ --no-remove-listing 20 20 FILES=$(cat index.html | grep "${VERSION}" | cut -f6 -d. | cut -f1 -d'"' | sed '/^$/d' | tail -n 1) … … 33 33 # Set Patch Number 34 34 # 35 cd ~/tmp35 cd /usr/src 36 36 wget http://svn.cross-lfs.org/svn/repos/cross-lfs/trunk/patches/ --no-remove-listing 37 37 PATCH_NUM=$(cat index.html | grep vim | grep "${VERSION}" | grep branch_update | cut -f2 -d'"' | cut -f1 -d'"'| cut -f4 -d- | cut -f1 -d. | tail -n 1) … … 44 44 tar xvf vim-${VERSION}.tar.bz2 45 45 cp -ar vim${SERIES} vim${SERIES}.orig 46 cd vim${SERIES} 47 CURRENTDIR=$(pwd -P) 46 48 47 49 # Download and Apply Patches 48 50 # 49 install -d ~/tmp/vim-${VERSION}-patches50 cd ~/tmp/vim${SERIES}51 CURRENTDIR=$(pwd -P)52 51 PATCHURL=ftp://ftp.vim.org/pub/vim/patches/${VERSION} 52 mkdir /tmp/vim-${VERSION} 53 53 COUNT=1 54 54 while [ ${COUNT} -le ${FILES} ]; do 55 cd ~/tmp/vim${SERIES}55 cd /tmp/vim-${VERSION} 56 56 DLCOUNT="${COUNT}" 57 57 SKIPME=no … … 71 71 if [ "${SKIPME}" != "yes" ]; then 72 72 if ! [ -e ${VERSION}.${DLCOUNT} ]; then 73 cd ~/tmp/vim-${VERSION}-patches74 73 wget --quiet $PATCHURL/${VERSION}.${DLCOUNT} 75 74 fi 76 75 cd $CURRENTDIR 77 patch --dry-run -s -f -Np0 -i ~/tmp/vim-${VERSION}-patches/${VERSION}.${DLCOUNT}76 patch --dry-run -s -f -Np0 -i /tmp/vim-${VERSION}/${VERSION}.${DLCOUNT} 78 77 if [ "$?" = "0" ]; then 79 78 echo "Patch ${VERSION}.${DLCOUNT} applied" 80 patch -s -Np0 -i ~/tmp/vim-${VERSION}-patches/${VERSION}.${DLCOUNT}79 patch -s -Np0 -i /tmp/vim-${VERSION}/${VERSION}.${DLCOUNT} 81 80 else 82 81 echo "Patch ${VERSION}.${DLCOUNT} not applied" 82 rm -f /tmp/vim-${VERSION}/${VERSION}.${DLCOUNT} 83 83 SKIPPED="${SKIPPED} ${DLCOUNT}" 84 84 fi … … 90 90 # 91 91 for dir in $(find * -type d); do 92 cd ~/tmp/vim${SERIES}92 cd /usr/src/vim${SERIES} 93 93 for file in $(find . -name '*~'); do 94 94 rm -f ${file} … … 98 98 done 99 99 done 100 cd ~/tmp/vim${SERIES}100 cd /usr/src/vim${SERIES} 101 101 rm -f *~ *.orig 102 102 103 103 # Create Patch 104 104 # 105 cd ~/tmp106 echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > ~/patches/vim-${VERSION}-branch_update-${PATCH_NUM}.patch107 echo "Date: `date +%m-%d-%Y`" >> ~/patches/vim-${VERSION}-branch_update-${PATCH_NUM}.patch108 echo "Initial Package Version: ${VERSION}" >> ~/patches/vim-${VERSION}-branch_update-${PATCH_NUM}.patch109 echo "Origin: Upstream" >> ~/patches/vim-${VERSION}-branch_update-${PATCH_NUM}.patch110 echo "Upstream Status: Applied" >> ~/patches/vim-${VERSION}-branch_update-${PATCH_NUM}.patch111 echo "Description: Contains all upstream patches up to ${VERSION}.${FILES}" >> ~/patches/vim-${VERSION}-branch_update-${PATCH_NUM}.patch105 cd /usr/src 106 echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > vim-${VERSION}-branch_update-${PATCH_NUM}.patch 107 echo "Date: `date +%m-%d-%Y`" >> vim-${VERSION}-branch_update-${PATCH_NUM}.patch 108 echo "Initial Package Version: ${VERSION}" >> vim-${VERSION}-branch_update-${PATCH_NUM}.patch 109 echo "Origin: Upstream" >> vim-${VERSION}-branch_update-${PATCH_NUM}.patch 110 echo "Upstream Status: Applied" >> vim-${VERSION}-branch_update-${PATCH_NUM}.patch 111 echo "Description: Contains all upstream patches up to ${VERSION}.${FILES}" >> vim-${VERSION}-branch_update-${PATCH_NUM}.patch 112 112 if [ -n "${SKIPPED}" ]; then 113 echo " The following patches were skipped" >> ~/patches/vim-${VERSION}-branch_update-${PATCH_NUM}.patch114 echo " ${SKIPPED}" >> ~/patches/vim-${VERSION}-branch_update-${PATCH_NUM}.patch113 echo " The following patches were skipped" >> vim-${VERSION}-branch_update-${PATCH_NUM}.patch 114 echo " ${SKIPPED}" >> vim-${VERSION}-branch_update-${PATCH_NUM}.patch 115 115 fi 116 echo "" >> ~/patches/vim-${VERSION}-branch_update-${PATCH_NUM}.patch 117 diff -Naur vim${SERIES}.orig vim${SERIES} >> ~/patches/vim-${VERSION}-branch_update-${PATCH_NUM}.patch 118 echo "Created ~/patches/vim-${VERSION}-branch_update-${PATCH_NUM}.patch." 119 120 # Cleanup Directory 121 # 122 rm -rf vim${SERIES} vim${SERIES}.orig 116 echo "" >> vim-${VERSION}-branch_update-${PATCH_NUM}.patch 117 diff -Naur vim${SERIES}.orig vim${SERIES} >> vim-${VERSION}-branch_update-${PATCH_NUM}.patch 118 echo "Created /usr/src/vim-${VERSION}-branch_update-${PATCH_NUM}.patch."
Note:
See TracChangeset
for help on using the changeset viewer.