Skip to content
This repository was archived by the owner on Aug 18, 2020. It is now read-only.

Commit c43b758

Browse files
committed
fix sbterr, add yarn support
1 parent ff4eb1c commit c43b758

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

install.sh

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function checkdep() {
1818
echo " * Testing for dependencies..."
1919

2020

21-
checkdep npm "NPM is needed to set up webui"
21+
command -v npm >/dev/null 2>&1 || command -v yarn >/dev/null 2>&1 || error "NPM or yarn is needed to set up webui"
2222
checkdep git "Git is required to clone individual subrepos"
2323

2424
echo " * Cloning repositories..."
@@ -39,14 +39,21 @@ function sbterr() {
3939
echo "We would love to set the project up for you, but it seems like you don't have sbt installed."
4040
echo "Please install sbt and execute $ sbt ';update;fetch;update'"
4141
echo "Or follow the guide at https://github.com/codeoverflow-org/chatoverflow/wiki/Installation"
42-
exit
4342
}
4443

45-
command -v sbt >/dev/null 2>&1 || sbterr
44+
command -v sbt >/dev/null 2>&1 \
45+
&& sbt ";update;fetch;update" \
46+
|| sbterr
4647

4748
# update project first, then fetch plugins; then update the whole thing again
4849
# (including plugins this time)
49-
sbt ";update;fetch;update"
50+
51+
echo " * Setting up GUI..."
52+
53+
cd gui
54+
55+
command -v npm >/dev/null 2>&1 && npm install
56+
command -v yarn >/dev/null 2>&1 && yarn
5057

5158
# done?
5259
echo " * Success! You can now open the project in IntelliJ (or whatever IDE you prefer)"

0 commit comments

Comments
 (0)