Advertisement
Guest User

patch download script for linux for correct hashsum files

a guest
Jul 13th, 2015
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 3.90 KB | None | 0 0
  1. --- sh/DownloadUpdates.sh.orig  2015-07-13 13:37:33.556811841 +0200
  2. +++ sh/DownloadUpdates.sh       2015-07-13 13:47:09.744792514 +0200
  3. @@ -373,7 +373,9 @@
  4.      done < ../temp/StaticUrls-${Datei}.txt
  5.  
  6.    echo "Creating integrity database for $Txt ..."
  7. -  hashdeep -c md5,sha1,sha256 -l -r ../client/$Vz | tr '/' '\\' > ../client/md/hashes-${Vz}.txt
  8. +  cd ../client/md
  9. +  hashdeep -c md5,sha1,sha256 -l -r ../$Vz | tr '/' '\\' > hashes-${Vz}.txt
  10. +  cd "$PATH_PWD"
  11.      }
  12.  
  13.  crlf2lf() {
  14. @@ -921,10 +923,12 @@
  15.      do
  16.          test -s "$Datei" || rm "$Datei"
  17.      done
  18. -    hashdeep -c md5,sha1,sha256 -l ../client/${Vz}/*.exe | tr '/' '\\' > ../client/md/hashes-${Vz}.txt
  19. +    cd ../client/md
  20. +    hashdeep -c md5,sha1,sha256 -l ../${Vz}/*.exe | tr '/' '\\' > hashes-${Vz}.txt
  21.  
  22. -  echo "Creating integrity database for ${Txt}-${OS_ARCH}-glb ..."
  23. -  hashdeep -c md5,sha1,sha256 -l -r ../client/${Vz}/${OS_ARCH}-glb | tr '/' '\\' > ../client/md/hashes-${Vz}-${OS_ARCH}-glb.txt
  24. +    echo "Creating integrity database for ${Txt}-${OS_ARCH}-glb ..."
  25. +    hashdeep -c md5,sha1,sha256 -l -r ../${Vz}/${OS_ARCH}-glb | tr '/' '\\' > hashes-${Vz}-${OS_ARCH}-glb.txt
  26. +    cd "$PATH_PWD"
  27.  
  28.      Vz=cpp
  29.      Txt=CPP
  30. @@ -976,20 +980,26 @@
  31.     doWget -i ../temp/StaticUrls-${sys_old}-${lang}.txt -P ../client/${sys_old}/${lang}
  32.     doWget -i ../temp/StaticUrls-${sys_old}-glb.txt -P ../client/${sys_old}/glb
  33.     echo "Creating integrity database for ${sys_old} ${lang}..."
  34. -   hashdeep -c md5,sha1,sha256 -l -r ../client/${sys_old}/${lang} | tr '/' '\\' > ../client/md/hashes-${sys_old}-${lang}.txt
  35. -   hashdeep -c md5,sha1,sha256 -l -r ../client/${sys_old}/glb | tr '/' '\\' > ../client/md/hashes-${sys_old}-glb.txt
  36. +   cd ../client/md
  37. +   hashdeep -c md5,sha1,sha256 -l -r ../${sys_old}/${lang} | tr '/' '\\' > hashes-${sys_old}-${lang}.txt
  38. +   hashdeep -c md5,sha1,sha256 -l -r ../${sys_old}/glb | tr '/' '\\' > hashes-${sys_old}-glb.txt
  39. +   cd "$PATH_PWD"
  40.  fi
  41.  
  42.  echo "Validating patches for $sys ${lang}..."
  43.  if [ $lang != glb ]; then
  44.    doWget -i ../temp/ValidUrls-${sys}-${lang}.txt -P ../client/${sys}/${lang}
  45.    echo "Creating integrity database for $sys-$lang ..."
  46. -  hashdeep -c md5,sha1,sha256 -l -r ../client/${sys}/${lang} | tr '/' '\\' > ../client/md/hashes-${sys}-${lang}.txt
  47. +  cd ../client/md
  48. +  hashdeep -c md5,sha1,sha256 -l -r ../${sys}/${lang} | tr '/' '\\' > hashes-${sys}-${lang}.txt
  49. +  cd "$PATH_PWD"
  50.  fi
  51.  doWget -i ../temp/ValidUrls-${sys}-glb.txt -P ../client/${sys}/glb
  52.  if [ -d ../client/${sys}/glb ]; then
  53.    echo "Creating integrity database for $sys-glb ..."
  54. -  hashdeep -c md5,sha1,sha256 -l -r ../client/${sys}/glb | tr '/' '\\' > ../client/md/hashes-${sys}-glb.txt
  55. +  cd ../client/md
  56. +  hashdeep -c md5,sha1,sha256 -l -r ../${sys}/glb | tr '/' '\\' > hashes-${sys}-glb.txt
  57. +  cd "$PATH_PWD"
  58.  fi
  59.  
  60.  if [ $lang != glb -a $sys != "w2k3-x64" ] ; then
  61. @@ -1001,16 +1011,22 @@
  62.  
  63.  if [ -d ../client/win/${lang} -a $lang != glb  ]; then
  64.    echo "Creating integrity database for win-$lang ..."
  65. -  hashdeep -c md5,sha1,sha256 -l -r ../client/win/${lang} | tr '/' '\\' > ../client/md/hashes-win-${lang}.txt
  66. +  cd ../client/md
  67. +  hashdeep -c md5,sha1,sha256 -l -r ../win/${lang} | tr '/' '\\' > hashes-win-${lang}.txt
  68. +  cd "$PATH_PWD"
  69.  fi
  70.  if [ -d ../client/win/glb ]; then
  71.    echo "Creating integrity database for win-glb ..."
  72. -  hashdeep -c md5,sha1,sha256 -l -r ../client/win/glb | tr '/' '\\' > ../client/md/hashes-win-glb.txt
  73. +  cd ../client/md
  74. +  hashdeep -c md5,sha1,sha256 -l -r ../win/glb | tr '/' '\\' > hashes-win-glb.txt
  75. +  cd "$PATH_PWD"
  76.  fi
  77.  
  78.  if [ -d ../client/wsus ]; then
  79.    echo "Creating integrity database for WSUS ..."
  80. -  hashdeep -c md5,sha1,sha256 -l -r ../client/wsus | tr '/' '\\' > ../client/md/hashes-wsus.txt
  81. +  cd ../client/md
  82. +  hashdeep -c md5,sha1,sha256 -l -r ../wsus | tr '/' '\\' > hashes-wsus.txt
  83. +  cd "$PATH_PWD"
  84.  fi
  85.  
  86.  echo "**************************************
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement