Browse Source

posix main: only try to generate symlinks if data path argument given

if not given, the dirs are either not needed (eg RPI) or assumed to
exist already
sbg
Beat Küng 9 years ago committed by Julian Oes
parent
commit
e061842219
  1. 10
      src/platforms/posix/main.cpp

10
src/platforms/posix/main.cpp

@ -358,12 +358,16 @@ int main(int argc, char **argv) @@ -358,12 +358,16 @@ int main(int argc, char **argv)
return -1;
}
bool symlinks_needed = true;
if (positional_arg_count == 1) { //data path is optional
commands_file = data_path;
data_path = ".";
}
symlinks_needed = false;
} else {
cout << "data path: " << data_path << endl;
}
cout << "commands file: " << commands_file << endl;
if (commands_file.size() < 1) {
@ -377,6 +381,7 @@ int main(int argc, char **argv) @@ -377,6 +381,7 @@ int main(int argc, char **argv)
}
// create sym-links
if (symlinks_needed) {
vector<string> path_sym_links;
path_sym_links.push_back("ROMFS");
path_sym_links.push_back("posix-configs");
@ -405,6 +410,7 @@ int main(int argc, char **argv) @@ -405,6 +410,7 @@ int main(int argc, char **argv)
src_path.c_str(), dest_path.c_str());
}
}
}
// setup rootfs
const string eeprom_path = "./rootfs/eeprom/";

Loading…
Cancel
Save