Dwarf Fortress Bug Tracker - Dwarf Fortress
View Issue Details
0007276Dwarf FortressTechnical -- Generalpublic2014-07-14 07:282014-08-20 12:10
ChoHag 
Footkerchief 
nonetrivialalways
resolvedduplicate 
Linux
0.40.03 
 
0007276: Worldgen arguments are not passed on correctly from the df script
$* 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
The 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! :)
No tags attached.
duplicate of 0006394resolved Toady One "df" script does not pass command-line arguments correctly (i.e. for world generation) on OS X/Linux 
Issue History
2014-07-14 07:28ChoHagNew Issue
2014-07-14 08:59FootkerchiefSummaryArguments are not passed on correctly from the df script => Worldgen arguments are not passed on correctly from the df script
2014-08-20 11:13BenLubarNote Added: 0029366
2014-08-20 12:10FootkerchiefRelationship addedduplicate of 0006394
2014-08-20 12:10FootkerchiefStatusnew => resolved
2014-08-20 12:10FootkerchiefResolutionopen => duplicate
2014-08-20 12:10FootkerchiefAssigned To => Footkerchief

Notes
(0029366)
BenLubar   
2014-08-20 11:13   
This has been fixed as of 0.40.09. Not sure how to notify someone to close it.