We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f08bc4a commit fc4b1c5Copy full SHA for fc4b1c5
demos/restart_demo.sh
@@ -2,6 +2,23 @@
2
3
set -ex
4
5
+
6
+NODE_MAJOR_VERSION=`node --version | cut -d'.' -f 1 | cut -d'v' -f 2`
7
8
+test_node_version () {
9
+ MAJOR_VERSION_RE='^[0-9]+$'
10
+ # checks if a version exists
11
+ if ! [[ $1 =~ $MAJOR_VERSION_RE ]] ; then
12
+ echo "Nodejs seems not installed. This requires nodejs>=14 to continue" >&2; exit 1
13
+ fi
14
+ # checks if the version is 14 or more
15
+ if [ $1 -lt 14 ]; then
16
+ echo "Nodejs version must be 14 or more, current is $1">&2; exit 1
17
18
+}
19
20
+test_node_version ${NODE_MAJOR_VERSION}
21
22
# Configuration variables.
23
root="$(realpath `dirname $0`)"
24
srv_root="/srv/nbgrader"
0 commit comments