mirror of
				https://github.com/factoriotools/factorio-docker.git
				synced 2025-10-31 17:08:08 +01:00 
			
		
		
		
	Update docker-entrypoint.sh (#253)
This commit is contained in:
		| @@ -29,7 +29,8 @@ if [ ! -f "$CONFIG/map-settings.json" ]; then | ||||
|   cp /opt/factorio/data/map-settings.example.json "$CONFIG/map-settings.json" | ||||
| fi | ||||
|  | ||||
| if find -L "$SAVES" -iname \*.tmp.zip -mindepth 1 -print | grep -q .; then | ||||
| NRTMPSAVES=$( find -L "$SAVES" -iname \*.tmp.zip -mindepth 1 | wc -l ) | ||||
| if [ $NRTMPSAVES -gt 0 ]; then | ||||
|   # Delete incomplete saves (such as after a forced exit) | ||||
|   rm -f "$SAVES/*.tmp.zip" | ||||
| fi | ||||
| @@ -46,7 +47,8 @@ else | ||||
|   SU_EXEC="" | ||||
| fi | ||||
|  | ||||
| if ! find -L "$SAVES" -iname \*.zip -mindepth 1 -print | grep -q .; then | ||||
| NRSAVES=$( find -L "$SAVES" -iname \*.zip -mindepth 1 | wc -l ) | ||||
| if [ $NRSAVES -eq 0 ]; then | ||||
|   # Generate a new map if no save ZIPs exist | ||||
|   $SU_EXEC /opt/factorio/bin/x64/factorio \ | ||||
|     --create "$SAVES/_autosave1.zip" \ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user