Ignore:
Timestamp:
Jan 20, 2009, 4:01:19 PM (15 years ago)
Author:
Jim Gifford <clfs@…>
Branches:
clfs-1.2, clfs-2.1, clfs-3.0.0-systemd, clfs-3.0.0-sysvinit, master, systemd, sysvinit
Children:
550b73d
Parents:
d8b9d99
Message:

Added Perl Patch and cleaned up

File:
1 edited

Legend:

Unmodified
Added
Removed
  • scripts/patch/readline-patch.sh

    rd8b9d99 r9676bac  
    99#
    1010if [ "${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
    1314fi
    1415
     
    2728#
    2829if ! [ -e readline-${VERSION}.tar.gz ]; then
    29         wget ftp://ftp.cwru.edu/pub/bash/readline-${VERSION}.tar.gz
     30  wget ftp://ftp.cwru.edu/pub/bash/readline-${VERSION}.tar.gz
    3031fi
    3132
     
    4445COUNT=1
    4546while [ ${COUNT} -le ${FILES} ]; do
    46         cd /tmp/readline-${VERSION}           
    47         DLCOUNT="${COUNT}"
    48         SKIPME=no
    49         if [ "${COUNT}" -lt "100" ]; then
    50                 DLCOUNT="0${COUNT}"
    51         fi
    52         if [ "${COUNT}" -lt "10" ]; then
    53                 DLCOUNT="00${COUNT}"
    54         fi
    55         for skip in ${SKIPPATCH} ; do
    56                 if [ "${DLCOUNT}" = "$skip" ]; then
    57                         echo "Patch readline${VERSION2}-${DLCOUNT} skipped"
    58                         SKIPPED="${SKIPPED} ${DLCOUNT}"
    59                         SKIPME=yes
    60                 fi
    61         done
    62         if [ "${SKIPME}" != "yes" ]; then
    63                 if ! [ -e ${VERSION}.${DLCOUNT} ]; then
    64                         wget --quiet ${PATCHURL}/readline${VERSION2}-${DLCOUNT}
    65                 fi
    66                 cd ${CURRENTDIR}
    67                 patch --dry-run -s -f -Np0 -i /tmp/readline-${VERSION}/readline${VERSION2}-${DLCOUNT}
    68                 if [ "$?" = "0" ]; then
    69                         echo "Patch readline${VERSION2}-${DLCOUNT} applied"
    70                         patch -s -Np0 -i /tmp/readline-${VERSION}/readline${VERSION2}-${DLCOUNT}
    71                 else
    72                         echo "Patch readline${VERSION2}-${DLCOUNT} not applied"
    73                         rm -f /tmp/readline-${VERSION}/readline${VERSION2}-${DLCOUNT}
    74                         SKIPPED="${SKIPPED} ${DLCOUNT}"
    75                 fi
    76         fi
    77         COUNT=`expr ${COUNT} + 1`
     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`
    7879done
    7980
     
    8384#
    8485for dir in $(find * -type d); do
    85         cd /usr/src/readline-${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
     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
    9293done
    9394cd /usr/src/readline-${VERSION}
     
    104105echo "Description: Contains all upstream patches up to ${VERSION}-${FILES}" >> readline-${VERSION}-branch_update-x.patch
    105106if [ -n "${SKIPPED}" ]; then
    106         echo "            Thee following patches were skipped" >> readline-${VERSION}-branch_update-x.patch
    107         echo "            ${SKIPPED}" >> readline-${VERSION}-branch_update-x.patch
     107  echo "            Thee following patches were skipped" >> readline-${VERSION}-branch_update-x.patch
     108  echo "            ${SKIPPED}" >> readline-${VERSION}-branch_update-x.patch
    108109fi
    109110echo "" >> readline-${VERSION}-branch_update-x.patch
    110111diff -Naur readline-${VERSION}.orig readline-${VERSION} >> readline-${VERSION}-branch_update-x.patch
    111112echo "Created /usr/src/readline-${VERSION}-branch_update-x.patch."
    112 
Note: See TracChangeset for help on using the changeset viewer.