File tree Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
22
3+ # Function to display help message
4+ show_help () {
5+ echo " Usage: $( basename " $0 " ) [OPTIONS]"
6+ echo " This function formats all code in and below the current execution directory."
7+ echo " "
8+ echo " Options:"
9+ echo " -h, --help Display this help message and exit."
10+ echo " -j, --jobs JOBS Runs JOBS number of jobs."
11+ echo " "
12+ exit 0
13+ }
14+
315while [[ $# -gt 0 ]]; do
416 case " $1 " in
517 -j|--jobs)
618 JOBS=" $2 "
719 shift
820 ;;
21+ -h | --help)
22+ show_help
23+ ;;
924 * )
1025 echo " Format, unknown argument: $1 ."
1126 exit 1
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3+ # Function to display help message
4+ show_help () {
5+ echo " Usage: $( basename " $0 " ) [OPTIONS]"
6+ echo " This function loads in modules for a specific computer and mode"
7+ echo " "
8+ echo " Options:"
9+ echo " -h, --help Display this help message and exit."
10+ echo " -c, --computer COMPUTER Configures for COMPUTER environment."
11+ echo " Options: Ascent (a) | Frontier (f) | Summit (s) | Wombat (w)"
12+ echo " Bridges2 (b) | Expanse (e) | Delta (d) | DeltaAI (dai)"
13+ echo " Phoenix (p) | Richardson (r) | Oscar (o)"
14+ echo " Carpenter Cray (cc) | Carpenter GNU (c) | Nautilus (n)"
15+ echo " -m, --mode MODE Configures into MODE."
16+ echo " Options: gpu (g) | cpu (c)"
17+ echo " "
18+ exit 0
19+ }
20+
321unset u_c
422unset u_cg
523
@@ -12,6 +30,7 @@ while [[ $# -gt 0 ]]; do
1230 case $1 in
1331 -c|--computer) u_c=" $2 " ; shift ; shift ; ;;
1432 -m|--mode) u_cg=" $2 " ; shift ; shift ; ;;
33+ -h|--help) show_help; shift ; shift ; ;;
1534 -* |--* ) echo " Unknown option $1 " ; return ; ;;
1635 esac
1736done
You can’t perform that action at this time.
0 commit comments