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

0.2
Last change on this file since b3ad542 was d494c36, checked in by Jeremy Huntwork <jhuntwork@…>, 19 years ago

Tagged the 0.2 branch

  • Property mode set to 100644
File size: 1.7 KB
RevLine 
[bf3ad3a]1Submitted By: John Kelly (jakelly at shtc dot net)
[4e5e9b4]2Date: 2005-09-26
3Initial Package Version: 0.2
4Origin: alfs-discuss
5Upstream Status: Optional
6Description: Allow jhalfs to work with a md5sum program
[bf3ad3a]7that doesn't accept '-' as a filename, like the one shipped with
[4e5e9b4]8Debian 3.1 stable.
9
[d494c36]10--- jhalfs.orig 2005-12-01 00:57:13.000000000 +0000
11+++ jhalfs 2005-12-01 00:57:26.000000000 +0000
12@@ -260,9 +260,12 @@
13 DIR=`echo $1 | sed 's@-doc@@;s@-linuxthreads@@;s@-libidn@@;s@-testsuite@@'`
[bf3ad3a]14
[4e5e9b4]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
[bf3ad3a]21
[4e5e9b4]22- if [ ! -f $2 ] ; then
23+ if [ ! -f $2 -o $2 == MD5SUMS ] ; then
24 case $DL in
25 wget )
26 wget $HTTP/$DIR/$2
[d494c36]27@@ -274,7 +277,7 @@
[4e5e9b4]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
[d494c36]36@@ -287,8 +290,11 @@
[4e5e9b4]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
[d494c36]48 if [ $2 != MD5SUMS ] ; then
49 echo `grep "$MD5" MD5SUMS` >> MD5SUMS-$VERSION
Note: See TracBrowser for help on using the repository browser.