Diff for /embedaddon/smartmontools/update-smart-drivedb.in between versions 1.1.1.1 and 1.1.1.2

version 1.1.1.1, 2012/02/21 16:32:16 version 1.1.1.2, 2013/10/14 07:54:04
Line 2 Line 2
 #  #
 # smartmontools drive database update script  # smartmontools drive database update script
 #  #
# Copyright (C) 2010-11 Christian Franke <smartmontools-support@lists.sourceforge.net># Copyright (C) 2010-13 Christian Franke <smartmontools-support@lists.sourceforge.net>
 #  #
 # This program is free software; you can redistribute it and/or modify  # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by  # it under the terms of the GNU General Public License as published by
Line 39  DEST="$drivedbdir/drivedb.h" Line 39  DEST="$drivedbdir/drivedb.h"
 # Smartctl used for syntax check  # Smartctl used for syntax check
 SMARTCTL="$sbindir/smartctl"  SMARTCTL="$sbindir/smartctl"
   
# Trac repository browser (does not return HTTP 404 errors)# Download URL for sourceforge code browser
#SRCEXPR='http://sourceforge.net/apps/trac/smartmontools/export/HEAD/$location/smartmontools/drivedb.h'SRCEXPR='http://sourceforge.net/p/smartmontools/code/HEAD/tree/$location/smartmontools/drivedb.h?format=raw'
   
 # ViewVC repository browser  
 SRCEXPR='http://smartmontools.svn.sourceforge.net/viewvc/smartmontools/$location/smartmontools/drivedb.h?revision=HEAD'  
   
   
 # Parse options  # Parse options
 q="-q "  q="-q "
 case "$1" in  case "$1" in
Line 106  for location in "branches/$BRANCH" "trunk"; do Line 102  for location in "branches/$BRANCH" "trunk"; do
     errmsg="download from $location failed (HTTP error)"      errmsg="download from $location failed (HTTP error)"
     continue      continue
   fi    fi
  if grep -i 'ViewVC Exception' "$DEST.new" >/dev/null; then  if grep -i '<title>.*Error has Occurred' "$DEST.new" >/dev/null; then
    errmsg="download from $location failed (ViewVC error)"    errmsg="download from $location failed (SF code browser error)"
     continue      continue
   fi    fi
   
Line 132  if $SMARTCTL -B "$DEST.new" -P showall >/dev/null; the Line 128  if $SMARTCTL -B "$DEST.new" -P showall >/dev/null; the
   exit 1    exit 1
 fi  fi
   
# Keep old file if identical, ignore differences in Id string# Keep old file if identical
 rm -f "$DEST.lastcheck"  rm -f "$DEST.lastcheck"
 if [ -f "$DEST" ]; then  if [ -f "$DEST" ]; then
  if cat "$DEST" | sed 's|\$''Id''[^$]*\$|$''Id''$|' | cmp - "$DEST.new" >/dev/null; then  if cmp "$DEST" "$DEST.new" >/dev/null 2>/dev/null; then
     rm -f "$DEST.new"      rm -f "$DEST.new"
     touch "$DEST.lastcheck"      touch "$DEST.lastcheck"
     echo "$DEST is already up to date"      echo "$DEST is already up to date"

Removed from v.1.1.1.1  
changed lines
  Added in v.1.1.1.2


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>