Diff

Differences From Artifact [228f428c97]:

To Artifact [8dbe3ef0bd]:


    37     37   
    38     38   if [ ! -f "${SRC}" ]; then
    39     39   	mkdir 'src' >/dev/null 2>/dev/null
    40     40   
    41     41   	use_fossil='0'
    42     42   	if echo "${TCLVERS}" | grep '^cvs_' >/dev/null; then
    43     43   		use_fossil='1'
           44  +
           45  +		FOSSILTAG=$(echo "${TCLVERS}" | sed 's/^cvs_//g')
           46  +		if [ "${FOSSILTAG}" = "HEAD" ]; then
           47  +			FOSSILTAG="trunk"
           48  +		fi
    44     49   	elif echo "${TCLVERS}" | grep '^fossil_' >/dev/null; then
    45     50   		use_fossil='1'
           51  +
           52  +		FOSSILTAG=$(echo "${TCLVERS}" | sed 's/^fossil_//g')
    46     53   	fi
    47     54   
    48     55   	if [ -d 'buildsrc' ]; then
    49     56   		# Override here to avoid downloading tarball from Fossil if we
    50     57   		# have a particular tree already available.
    51     58   		use_fossil='0'
    52     59   	fi
................................................................................
    59     66   
    60     67   			workdir="tmp-$$${RANDOM}${RANDOM}${RANDOM}"
    61     68   			rm -rf "${workdir}"
    62     69   
    63     70   			mkdir "${workdir}" || exit 1
    64     71   			cd "${workdir}" || exit 1
    65     72   
    66         -			wget -O "tmp-tk.tar.gz" "http://core.tcl.tk/tk/tarball/tk-fossil.tar.gz?uuid=${FOSSILDATE}" || rm -f 'tmp-tk.tar.gz'
    67         -			gzip -dc "tmp-tk.tar.gz" | tar -xf -
           73  +			wget -O "tmp-tk.tar.gz" "http://core.tcl.tk/tk/tarball/tk-fossil.tar.gz?uuid=${FOSSILTAG}" || rm -f 'tmp-tk.tar.gz'
           74  +			gzip -dc "tmp-tk.tar.gz" | tar -xf - || rm -f 'tmp-tk.tar.gz'
           75  +
           76  +			if [ ! -s 'tmp-tk.tar.gz' ]; then
           77  +				wget -O "tmp-tk.tar.gz" "http://core.tcl.tk/tk/tarball/tk-fossil.tar.gz?uuid=${FOSSILDATE}" || rm -f 'tmp-tk.tar.gz'
           78  +				gzip -dc "tmp-tk.tar.gz" | tar -xf -
           79  +			fi
    68     80   
    69     81   			mv "tk-fossil" "tk${TCLVERS}"
    70     82                           
    71     83   			tar -cf - "tk${TCLVERS}" | gzip -c > "../../${SRC}"
    72     84   
    73     85   			cd ..
    74     86   			rm -rf "${workdir}"