Skip to content

Commit 75b4060

Browse files
author
Damian Rouson
committed
Improve install.sh's opening header:
Direct end users to use package management if feasible. Direct advanced developers to use CMake. Redraw dependency tree lines without special characters. Instruct users to use --yes-to-all for interactive builds. Recommend --help to see installation options.
1 parent 6203ab9 commit 75b4060

File tree

1 file changed

+27
-18
lines changed

1 file changed

+27
-18
lines changed

prerequisites/install-functions/print_header.sh

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,30 +10,39 @@ print_header() {
1010
m4ver="$("${__file}" -V m4)"
1111
popd >/dev/null
1212
clear
13-
echo ""
14-
echo "*** By default, building OpenCoarrays requires CMake ${cmakever} or later, ***"
15-
echo "*** MPICH ${mpichver}, and GCC Fortran (gfortran) ${gccver} or later. To see ***"
16-
echo "*** options for forcing the use of older or alternative packages, execute ***"
17-
echo "*** this script with the -h flag. This script will recursively traverse ***"
18-
echo "*** the following dependency tree, asking permission to download, build, ***"
19-
echo "*** and install any packages that are required for building another ***"
20-
echo "*** package and are neither in your PATH nor in ***"
21-
echo "*** opencoarrays/prerequisites/installations: ***"
13+
echo "__________ Please read these instructions carefully before proceeding. ___________"
14+
echo "__________________________________________________________________________________"
15+
echo "*** Most end users will find it easier to install OpenCoarrays via the native ***"
16+
echo "*** package manager for the target operating system. Advanced developers will ***"
17+
echo "*** find it best to install via CMake. Please see the OpenCoarrays README.md ***"
18+
echo "*** for a list of supported package installers or for instructions on using ***"
19+
echo "*** CMake to install. The current script offers a fallback when other methods ***"
20+
echo "*** prove infeasible. This script builds any missing prerequisites from source ***"
21+
echo "*** and then builds OpenCoarrays from source. The process might take a few ***"
22+
echo "*** minutes if the script finds all prerequisites or several hours if the ***"
23+
echo "*** script finds no prerequisites. (Run './install.sh --help' without quotes ***"
24+
echo "*** to see the installation options.) This script traverses the following ***"
25+
echo "*** dependency tree and asks permission to install packages that are not in ***"
26+
echo "*** your PATH, not in the prerequisites/installations subdirectory of the ***"
27+
echo "*** OpenCoarrays source tree, or have insufficiently recent version numbers: ***"
2228
echo ""
2329
# Generate the following text using the `tree` command w/ dummy directory structure
2430
cat <<-EOF
2531
opencoarrays
26-
├── cmake-${cmakever}
27-
└── mpich-${mpichver}
28-
└── gcc-${gccver}
29-
├── flex-${flexver}
30-
└── bison-${bisonver}
31-
└── m4-${m4ver}
32-
├── gmp
33-
├── mpc
34-
└── mpfr
32+
|__ cmake-${cmakever}
33+
|__ mpich-${mpichver}
34+
|__ gcc-${gccver}
35+
|__ flex-${flexver}
36+
| |__ bison-${bisonver}
37+
| |__ m4-${m4ver}
38+
|__ gmp
39+
|__ mpc
40+
|__ mpfr
3541
3642
EOF
43+
echo "*** For a non-interactive installation, relaunch this script with the command ***"
44+
echo "*** './install.sh --yes-to-all' without quotes to instruct the script to ***"
45+
echo "*** assume affirmative answers to all user queries. ***"
3746
echo ""
3847
printf "%s will be installed in %s\n" "${arg_p}" "${install_path}"
3948
echo ""

0 commit comments

Comments
 (0)