if wget fails, factorio_headless.tar.xz will be automatically deleted

This commit is contained in:
Seaswimmer 2023-08-15 02:29:51 -04:00
parent df8637ab87
commit 43974aa1bf
No known key found for this signature in database
GPG key ID: 5019678FD9CF50D8

View file

@ -41,6 +41,7 @@ wget "https://factorio.com/get-download/${version}/headless/linux64" -O factorio
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "FATAL: There is not a headless linux64 build available for the version you've selected in your ${configpath} file." echo "FATAL: There is not a headless linux64 build available for the version you've selected in your ${configpath} file."
echo "FATAL: See this website for a list of all Factorio versions: https://factorio.com/download/archive/" echo "FATAL: See this website for a list of all Factorio versions: https://factorio.com/download/archive/"
rm -f factorio_headless.tar.xz
exit 1 exit 1
fi fi
echo "Extracting Factorio binary..." echo "Extracting Factorio binary..."