Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Absence of a 'metagrid_config' file on fresh install breaks manage_metagrid.sh #724

Open
meteorologist15 opened this issue Jan 25, 2025 · 3 comments

Comments

@meteorologist15
Copy link

Describe the bug

Upon an initial/fresh 'git clone', the metagrid_configs directory only contains a "metagrid_config.tmpl" file, which ends up breaking the "manage_metagrid.sh" script at the first copy command.

To Reproduce

  1. git clone https://github.com/aims-group/metagrid.git
  2. Within the metagrid directory, run 'manage_metagrid.sh'
  3. Select option 1: "Configure Metagrid"
  4. Error occurs: "cp: cannot stat 'metagrid_configs/metagrid_config': No such file or directory
@sashakames
Copy link
Collaborator

sashakames commented Jan 25, 2025

Good catch, we should streamline that, just an extra block of bash would do the trick to copy the .tmpl file

if [ ! -f metagrid_config ] ; then
 cp metagrid_config.tmpl metagrid_config
fi

@meteorologist15
Copy link
Author

Nice, or something like

if [ ! -f $METAGRID_CONFIG ] ; then
  cp $CONFIG_DIR/metagrid_config.tmpl $CONFIG_DIR/metagrid_config
fi

if running the script in the parent directory.

@sashakames
Copy link
Collaborator

Add that the editor should be configurable as not all systems have emacs and no need to require that or any

one editor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants