source: jhalfs-0.2-debian_31_as_host-1.patch@ db9cec6

0.2 1.0 2.3 2.3.x 2.4 ablfs ablfs-more legacy new_features trunk
Last change on this file since db9cec6 was 409488e, checked in by Manuel Canales Esparcia <manuel@…>, 19 years ago

Removed extra uneeded lines.

  • Property mode set to 100644
File size: 1.6 KB
RevLine 
[4e5e9b4]1Submitted By: Jhon Kelly (jakelly at shtc dot net)
2Date: 2005-09-26
3Initial Package Version: 0.2
4Origin: alfs-discuss
5Upstream Status: Optional
6Description: Allow jhalfs to work with a md5sum program
7that don't accept - as filename, like the one shipped with
8Debian 3.1 stable.
9
10--- jhalfs.orig 2005-09-25 17:17:15.000000000 -0400
11+++ jhalfs 2005-09-25 19:12:12.000000000 -0400
12@@ -189,9 +189,12 @@
13 DIR=`echo $1 | sed 's@-doc@@'`
14
15 # Find the md5 sum for this package.
16- if [ $2 != MD5SUMS ] ; then MD5=`grep " $2" MD5SUMS` ; fi
17+ if [ $2 != MD5SUMS ] ; then
18+ MD5=$(grep " $2" MD5SUMS | sed -r -e 's/^[[:blank:]]+//;s/[[:blank:]]+$//;s/[[:blank:]]+/ /g')
19+ md5_file=${MD5#* } ; md5_chksum=${MD5% *}
20+ fi
21
22- if [ ! -f $2 ] ; then
23+ if [ ! -f $2 -o $2 == MD5SUMS ] ; then
24 case $DL in
25 wget )
26 wget $HTTP/$DIR/$2
27@@ -203,7 +206,7 @@
28 echo "$DL not supported at this time."
29 ;;
30 esac
31- elif ! echo "$MD5" | md5sum -c - >/dev/null 2>/dev/null ; then
32+ elif [ "$md5_chksum" != "$(md5sum $md5_file | sed -r -e 's/^[[:blank:]]+//;s/[[:blank:]]+$//;s/[[:blank:]]+/\t/g' | cut -f 1)" ] ; then
33 case $DL in
34 wget )
35 wget -c $HTTP/$DIR/$2
36@@ -216,8 +219,11 @@
37 ;;
38 esac
39 fi
40- if [ $2 != MD5SUMS ] && ! echo "$MD5" | md5sum -c - ; then
41- exit 1
42+ if [ $2 != MD5SUMS ] ; then
43+ if [ "$md5_chksum" != "$(md5sum $md5_file | sed -r -e 's/^[[:blank:]]+//;s/[[:blank:]]+$//;s/[[:blank:]]+/\t/g' | cut -f 1)" ] ; then
44+ echo "$2 md5 checksum does not match $md5_chksum"
45+ exit 1
46+ fi
47 fi
48 }
49
50
Note: See TracBrowser for help on using the repository browser.