From f3df464856682f1f344a72bce39ff1df38774cb5 Mon Sep 17 00:00:00 2001 From: David Andersen Date: Tue, 25 Oct 2016 18:30:24 +0000 Subject: [PATCH] simplify startup --- smart_launch.sh | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/smart_launch.sh b/smart_launch.sh index 8ddb057..8040453 100755 --- a/smart_launch.sh +++ b/smart_launch.sh @@ -2,14 +2,9 @@ SAVES=/opt/factorio/saves -if [ -f $SAVES/*.zip ] +if [ ! -f $SAVES/*.zip ] then - last_save=$(ls $SAVES -lt | grep save |head -1 |awk '{print $(NF)}') -else - last_save="save.zip" - /opt/factorio/bin/x64/factorio --create $SAVES/$last_save + /opt/factorio/bin/x64/factorio --create $SAVES/save.zip fi -exec /opt/factorio/bin/x64/factorio \ - --start-server \ - $SAVES/$last_save +exec /opt/factorio/bin/x64/factorio --start-server-load-latest