Ticket #27330: update-smart-drivedb-sed.patch

File update-smart-drivedb-sed.patch, 756 bytes (added by Christian.Franke@…, 14 years ago)

This should work with any sed

  • update-smart-drivedb.in

     
    4040SRCEXPR='http://smartmontools.svn.sourceforge.net/viewvc/smartmontools/$location/smartmontools/drivedb.h?revision=HEAD'
    4141
    4242# Convert version into branch name: 5.41[.X] -> "RELEASE_5_41_DRIVEDB"
    43 BRANCH="`echo $VERSION | sed -n 's|^\([0-9][0-9]*\)\.\([0-9][0-9]*\)\([^0-9].*\)\?$|RELEASE_\1_\2_DRIVEDB|p'`"
     43BRANCH="`echo $VERSION | sed 's|^\([0-9]*\.[0-9]*\)\..*$|\1|' \
     44         | sed -n 's|^\([0-9][0-9]*\)\.\([0-9][0-9]*\)$|RELEASE_\1_\2_DRIVEDB|p'`"
    4445
    4546if [ -z "$BRANCH" ]; then
    4647  echo "$0: syntax error in version number: $VERSION" >&2; exit 1