source:
jhalfs-0.2-debian_31_as_host-1.patch@
b8bf2f8
Last change on this file since b8bf2f8 was 409488e, checked in by , 19 years ago | |
---|---|
|
|
File size: 1.6 KB |
-
jhalfs
Submitted By: Jhon Kelly (jakelly at shtc dot net) Date: 2005-09-26 Initial Package Version: 0.2 Origin: alfs-discuss Upstream Status: Optional Description: Allow jhalfs to work with a md5sum program that don't accept - as filename, like the one shipped with Debian 3.1 stable.
old new 189 189 DIR=`echo $1 | sed 's@-doc@@'` 190 190 191 191 # Find the md5 sum for this package. 192 if [ $2 != MD5SUMS ] ; then MD5=`grep " $2" MD5SUMS` ; fi 192 if [ $2 != MD5SUMS ] ; then 193 MD5=$(grep " $2" MD5SUMS | sed -r -e 's/^[[:blank:]]+//;s/[[:blank:]]+$//;s/[[:blank:]]+/ /g') 194 md5_file=${MD5#* } ; md5_chksum=${MD5% *} 195 fi 193 196 194 if [ ! -f $2 ] ; then197 if [ ! -f $2 -o $2 == MD5SUMS ] ; then 195 198 case $DL in 196 199 wget ) 197 200 wget $HTTP/$DIR/$2 … … 203 206 echo "$DL not supported at this time." 204 207 ;; 205 208 esac 206 elif ! echo "$MD5" | md5sum -c - >/dev/null 2>/dev/null; then209 elif [ "$md5_chksum" != "$(md5sum $md5_file | sed -r -e 's/^[[:blank:]]+//;s/[[:blank:]]+$//;s/[[:blank:]]+/\t/g' | cut -f 1)" ] ; then 207 210 case $DL in 208 211 wget ) 209 212 wget -c $HTTP/$DIR/$2 … … 216 219 ;; 217 220 esac 218 221 fi 219 if [ $2 != MD5SUMS ] && ! echo "$MD5" | md5sum -c - ; then 220 exit 1 222 if [ $2 != MD5SUMS ] ; then 223 if [ "$md5_chksum" != "$(md5sum $md5_file | sed -r -e 's/^[[:blank:]]+//;s/[[:blank:]]+$//;s/[[:blank:]]+/\t/g' | cut -f 1)" ] ; then 224 echo "$2 md5 checksum does not match $md5_chksum" 225 exit 1 226 fi 221 227 fi 222 228 } 223 229
Note:
See TracBrowser
for help on using the repository browser.