mirror of
https://github.com/factoriotools/factorio-docker.git
synced 2024-11-10 12:47:24 +01:00
Added feature to take latest save
This commit is contained in:
parent
2d9d8e17b8
commit
2bd0d475eb
@ -9,7 +9,7 @@ Current Version
|
||||
#### Factorio
|
||||
[factorio's site](http://www.factorio.com)
|
||||
#### Docker image
|
||||
|
||||
Automatically takes latest save or autosave. when restarting the container.
|
||||
Versions
|
||||
-----
|
||||
I'm keeping the image up to date. If you need to use an older version, checkout out the different tags.
|
||||
|
@ -5,6 +5,10 @@ then
|
||||
echo "###"
|
||||
echo "# Using existing map [save.zip]"
|
||||
echo "###"
|
||||
echo "###"
|
||||
echo "# Finding latest map"
|
||||
echo "###"
|
||||
$last_save=ls /opt/factorio/saves -lt | grep save |head -1 |awk '{print $(NF)}'
|
||||
else
|
||||
echo "###"
|
||||
echo "# Creating a new map [save.zip]"
|
||||
@ -18,4 +22,4 @@ fi
|
||||
echo "###"
|
||||
echo "# Launching Game"
|
||||
echo "###"
|
||||
exec /opt/factorio/bin/x64/factorio --disallow-commands --start-server save.zip
|
||||
exec /opt/factorio/bin/x64/factorio --disallow-commands --start-server $last_save
|
||||
|
Loading…
Reference in New Issue
Block a user