View Issue Details

IDProjectCategoryView StatusLast Update
0007276Dwarf FortressTechnical -- Generalpublic2014-08-20 12:10
ReporterChoHag Assigned Touser6 
PrioritynoneSeveritytrivialReproducibilityalways
Status resolvedResolutionduplicate 
PlatformLinux 
Product Version0.40.03 
Summary0007276: Worldgen arguments are not passed on correctly from the df script
Description$* expands spaces in arguments, so this command:

./df -gen 1 RANDOM "MEDIUM ISLAND"

Ends up running this:

./libs/Dwarf_Fortress "-gen" "1" "RANDOM" "MEDIUM" "ISLAND"

Or from gamelog.txt:

*** STARTING NEW GAME ***
Command Line: -gen "1" "RANDOM" "MEDIUM" "ISLAND"
Command Line: World generation initiated.
Command Line: World generation parameter set MEDIUM not found -- using default.
Generating world using parameter set MEDIUM ISLAND
Additional InformationThe fix is as trivial as the problem: Change $* to "$@" (with quotes) so the whole file reads:

#!/bin/sh
DF_DIR=$(dirname "$0")
cd "${DF_DIR}"
export SDL_DISABLE_LOCK_KEYS=1 # Work around for bug in Debian/Ubuntu SDL patch.
#export SDL_VIDEO_CENTERED=1 # Centre the screen. Messes up resizing.
./libs/Dwarf_Fortress "$@" # Go, go, go! :)
TagsNo tags attached.

Relationships

duplicate of 0006394 resolvedToady One "df" script does not pass command-line arguments correctly (i.e. for world generation) on OS X/Linux 

Activities

BenLubar

2014-08-20 11:13

reporter   ~0029366

This has been fixed as of 0.40.09. Not sure how to notify someone to close it.

Issue History

Date Modified Username Field Change
2014-07-14 07:28 ChoHag New Issue
2014-07-14 08:59 user6 Summary Arguments are not passed on correctly from the df script => Worldgen arguments are not passed on correctly from the df script
2014-08-20 11:13 BenLubar Note Added: 0029366
2014-08-20 12:10 user6 Relationship added duplicate of 0006394
2014-08-20 12:10 user6 Status new => resolved
2014-08-20 12:10 user6 Resolution open => duplicate
2014-08-20 12:10 user6 Assigned To => user6