Beispiel #1
0
static int
read_complete_config(char *conf_file, char *conf_dir)
{
	if (init_main_config(conf_file, conf_dir) != 0) {
		error_msg(_("ERROR main sdk_config"));
		return -1;
	}

	if (init_common_config(conf_file, conf_dir) != 0)
		error_msg(_("ERROR common sdk_config done"));

	if (init_repo_config(conf_file, conf_dir) != 0)
		error_msg(_("ERROR repo sdk_config"));

	if (init_toolchain_config(conf_file, conf_dir) != 0)
		error_msg(_("ERROR toolchain sdk_config"));

	if (init_device_config(conf_file, conf_dir) != 0)
		error_msg(_("ERROR device sdk_config"));


	if (init_external_config(conf_file, conf_dir) != 0)
		error_msg(_("ERROR external sdk_config"));

	if (init_kernel_config(conf_file, conf_dir) != 0)
		error_msg(_("ERROR kernel sdk_config"));

	return 0;
}
Beispiel #2
0
Datei: erln8.c Projekt: mkb/erln8
// create ~/ERLN8_CONFIG_DIR, ~/ERLN8_CONFIG_DIR/config + related subdirs
// not atomic, if something blows up in here, the user will get
// a partial ~/ERLN8_CONFIG_DIR tree
void initialize() {
  if(check_home()) {
    g_warning("Configuration directory ~/" ERLN8_CONFIG_DIR " already exists\n");
    return;
  } else {
    //if(erl_on_path()) {
    //  g_warning("Erlang already exists on the current PATH\n");
    //}
    // create the top level config directory, then create all subdirs
    gchar* dirname = g_strconcat(homedir, "/" ERLN8_CONFIG_DIR "",(gchar*)0);
    g_debug("Creating %s\n", dirname);
    if(g_mkdir(dirname, S_IRWXU)) {
      g_error("Can't create directory %s\n", dirname);
      g_free(dirname);
      return;
    } else {
      g_free(dirname);
    }
    mk_config_subdir("otps");    // location of compiled otp source files
    mk_config_subdir("logs");    // logs!
    mk_config_subdir("repos"); // location of git repos
    init_main_config();
  }
}