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

File inquiry operators: csh VS tcsh #945

Closed
dqwu opened this issue Dec 21, 2016 · 1 comment
Closed

File inquiry operators: csh VS tcsh #945

dqwu opened this issue Dec 21, 2016 · 1 comment
Assignees

Comments

@dqwu
Copy link
Contributor

dqwu commented Dec 21, 2016

In cime_config/buildlib.mct, last file modification time is obtained with file inquiry operator M (supported by tcsh)
if ( (-M $MCT_DIR/Makefile ) >= (-M Makefile ) ) then

On the header of this file, it is indicated to use csh as the shell
#! /bin/csh -fx

On most machines, csh is actually tcsh so the command above works.
/usr/bin/csh -> /bin/tcsh
/bin/csh -> /etc/alternatives/csh, /etc/alternatives/csh -> /bin/tcsh

On some machines where csh is not tcsh (e.g. bsd-csh on Ubuntu) we will get an error:
if: Badly formed number.

If CIME wants to support both csh and tcsh, would it be better to test the csh version and suggest users to install tcsh (if csh is not tcsh)?

@rljacob rljacob added the ready label Jan 5, 2017
@rljacob rljacob closed this as completed in 263b2af Feb 8, 2017
@ghost ghost assigned rljacob Feb 8, 2017
@ghost ghost removed the ready label Feb 8, 2017
@jgfouca jgfouca reopened this Feb 8, 2017
@rljacob rljacob removed their assignment Feb 8, 2017
@rljacob rljacob added the ready label Mar 3, 2017
@jedwards4b
Copy link
Contributor

My suggestion is just to change the header to be
#! /bin/tcsh -fx
to correctly reflect the language requirement of this script.

jgfouca added a commit that referenced this issue May 11, 2017
no mask domain should be defined

Avoid defining non-existant variable MASK_DOMAIN_FILE
Explicitly note buildlib.mct is tcsh not csh

Test suite: hand tests
Test baseline:
Test namelist changes:
Test status: bit for bit

Fixes #945

User interface changes?:

Code review:
@ghost ghost removed the in progress label May 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants