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.
2 parents 3b88595 + 5c5f746 commit f541124Copy full SHA for f541124
lib/install.sh
@@ -4,5 +4,15 @@ set -e
4
5
LIBDIR=$(cd $(dirname $0); pwd)
6
7
-yarn --cwd ${LIBDIR}
8
-ln -s "${LIBDIR}/node_modules/.bin/lehre" "${LIBDIR}/lehre"
+if [ -x "$(command -v yarn)" ]; then
+ yarn --cwd "${LIBDIR}"
9
+ ln -fs "${LIBDIR}/node_modules/.bin/lehre" "${LIBDIR}/lehre"
10
+elif [ -x "$(command -v npm)" ]; then
11
+ cd "$LIBDIR"
12
+ npm install
13
14
+else
15
+ echo 'Neither yarn nor npm was found on your path' >&2
16
+ exit 1
17
+fi
18
+
0 commit comments