@@ -117,15 +117,14 @@
117117
118118 # the first two cases are the "new" default IIRC
119119 BIN_NAME_=$(echo $BIN_NAME | sed -e 's/-/_/g')
120− FILES="src/bin/$BIN_NAME_.rs src/bin/$BIN_NAME_/main.rs src/bin/main.rs src/main.rs"
120+ FILES=( "src/bin/$BIN_NAME_.rs" "src/bin/$BIN_NAME_/main.rs" "src/bin/main.rs" "src/main.rs" )
121121
122122 if ! [ -e "${libPath}" -o -e src/lib.rs -o -e "src/${libName}.rs" ]; then
123123 # if this is not a library the following path is also valid
124− FILES="src/$BIN_NAME_.rs $FILES"
124+ FILES=( "src/$BIN_NAME_.rs" "''${FILES[@]}" )
125125 fi
126126
127− echo $FILES
128− for file in $FILES;
127+ for file in "''${FILES[@]}";
129128 do
130129 echo "checking file $file"
131130 # first file that exists wins
@@ -140,7 +139,7 @@
140139 exit 1
141140 fi
142141 fi
143− build_bin $BIN_NAME $BIN_PATH
142+ build_bin "$BIN_NAME" "$BIN_PATH"
144143 done
145144
146145