source:
jhalfs-0.2-debian_31_as_host-1.patch@
70a223e
Last change on this file since 70a223e was bf3ad3a, checked in by , 19 years ago | |
---|---|
|
|
File size: 1.6 KB |
-
jhalfs
Submitted By: John 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 doesn't accept '-' as a filename, like the one shipped with Debian 3.1 stable.
old new 192 192 DIR=`echo $1 | sed -e 's@-doc@@' -e 's@-linuxthreads@@' -e 's@-libidn@@'` 193 193 194 194 # Find the md5 sum for this package. 195 if [ $2 != MD5SUMS ] ; then MD5=`grep " $2" MD5SUMS` ; fi 195 if [ $2 != MD5SUMS ] ; then 196 MD5=$(grep " $2" MD5SUMS | sed -r -e 's/^[[:blank:]]+//;s/[[:blank:]]+$//;s/[[:blank:]]+/ /g') 197 md5_file=${MD5#* } ; md5_chksum=${MD5% *} 198 fi 196 199 197 if [ ! -f $2 ] ; then200 if [ ! -f $2 -o $2 == MD5SUMS ] ; then 198 201 case $DL in 199 202 wget ) 200 203 wget $HTTP/$DIR/$2 … … 206 209 echo "$DL not supported at this time." 207 210 ;; 208 211 esac 209 elif ! echo "$MD5" | md5sum -c - >/dev/null 2>/dev/null; then212 elif [ "$md5_chksum" != "$(md5sum $md5_file | sed -r -e 's/^[[:blank:]]+//;s/[[:blank:]]+$//;s/[[:blank:]]+/\t/g' | cut -f 1)" ] ; then 210 213 case $DL in 211 214 wget ) 212 215 wget -c $HTTP/$DIR/$2 … … 219 222 ;; 220 223 esac 221 224 fi 222 if [ $2 != MD5SUMS ] && ! echo "$MD5" | md5sum -c - ; then 223 exit 1 225 if [ $2 != MD5SUMS ] ; then 226 if [ "$md5_chksum" != "$(md5sum $md5_file | sed -r -e 's/^[[:blank:]]+//;s/[[:blank:]]+$//;s/[[:blank:]]+/\t/g' | cut -f 1)" ] ; then 227 echo "$2 md5 checksum does not match $md5_chksum" 228 exit 1 229 fi 224 230 fi 225 231 } 226 232
Note:
See TracBrowser
for help on using the repository browser.