@@ -117,15 +117,14 @@
118 # the first two cases are the "new" default IIRC
118 # the first two cases are the "new" default IIRC
119 BIN_NAME_=$(echo $BIN_NAME | sed -e 's/-/_/g')
119 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" )
122 if ! [ -e "${libPath}" -o -e src/lib.rs -o -e "src/${libName}.rs" ]; then
122 if ! [ -e "${libPath}" -o -e src/lib.rs -o -e "src/${libName}.rs" ]; then
123 # if this is not a library the following path is also valid
123 # 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[@]}" )
128− for file in $FILES;
127+ for file in "''${FILES[@]}";
130 echo "checking file $file"
129 echo "checking file $file"
131 # first file that exists wins
130 # first file that exists wins
@@ -140,7 +139,7 @@
143− build_bin $BIN_NAME $BIN_PATH
142+ build_bin "$BIN_NAME" "$BIN_PATH"