1.0
2.3
2.3.x
2.4
ablfs
ablfs-more
legacy
new_features
trunk
Last change
on this file since 252ee85 was 782efe8, checked in by Jeremy Huntwork <jhuntwork@…>, 19 years ago |
Merged updated patch to trunk
|
-
Property mode
set to
100644
|
File size:
1.7 KB
|
Rev | Line | |
---|
[bf3ad3a] | 1 | Submitted By: John Kelly (jakelly at shtc dot net)
|
---|
[4e5e9b4] | 2 | Date: 2005-09-26
|
---|
| 3 | Initial Package Version: 0.2
|
---|
| 4 | Origin: alfs-discuss
|
---|
| 5 | Upstream Status: Optional
|
---|
| 6 | Description: Allow jhalfs to work with a md5sum program
|
---|
[bf3ad3a] | 7 | that doesn't accept '-' as a filename, like the one shipped with
|
---|
[4e5e9b4] | 8 | Debian 3.1 stable.
|
---|
| 9 |
|
---|
[782efe8] | 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
|
---|
[782efe8] | 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
|
---|
[782efe8] | 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
|
---|
[782efe8] | 48 | if [ $2 != MD5SUMS ] ; then
|
---|
| 49 | echo `grep "$MD5" MD5SUMS` >> MD5SUMS-$VERSION
|
---|
Note:
See
TracBrowser
for help on using the repository browser.