Diff

Differences From Artifact [e21d739f84]:

To Artifact [b1fd7e8b36]:


    40     40   			CVSTAG="trunk"
    41     41   		fi
    42     42   		export CVSTAG
    43     43   
    44     44   		(       
    45     45   			cd src || exit 1
    46     46   
    47         -			rm -f "tmp-tk.tar.gz"
           47  +			workdir="tmp-$$${RANDOM}${RANDOM}${RANDOM}"
           48  +			rm -rf "${workdir}"
           49  +
           50  +			mkdir "${workdir}" || exit 1
           51  +			cd "${workdir}" || exit 1
           52  +
    48     53   			wget -O "tmp-tk.tar.gz" "http://core.tcl.tk/tk/tarball/tk-${CVSTAG}.tar.gz?uuid=${CVSTAG}" || rm -f 'tmp-tk.tar.gz'
    49         -
    50     54   			gzip -dc "tmp-tk.tar.gz" | tar -xf -
    51         -			rm -f "tmp-tk.tar.gz"
    52         -			if [ -d "tk-${CVSTAG}.tar" ]; then
    53         -				rm -rf "tk-${CVSTAG}"
    54         -				mv "tk-${CVSTAG}.tar" "tk-${CVSTAG}"
    55         -			fi
    56     55   
    57         -			rm -rf "tk${TCLVERS}"
    58     56   			mv "tk-${CVSTAG}" "tk${TCLVERS}"
    59     57                           
    60         -			tar -cf - "tk${TCLVERS}" | gzip -c > "../${SRC}"
           58  +			tar -cf - "tk${TCLVERS}" | gzip -c > "../../${SRC}"
    61     59   
    62         -			rm -f "tmp-tk.tar.gz"
    63         -			rm -rf "tk-${CVSTAG}"
    64         -			rm -rf "tk${TCLVERS}"
           60  +			cd ..
           61  +			rm -rf "${workdir}"
    65     62   		)
    66     63   	else
    67     64   		rm -f "${SRC}.tmp"
    68     65   		wget -O "${SRC}.tmp" "${SRCURL}" || exit 1
    69     66   		mv "${SRC}.tmp" "${SRC}"
    70     67   	fi
    71     68   fi