-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathinstall.bash
More file actions
27 lines (22 loc) · 809 Bytes
/
install.bash
File metadata and controls
27 lines (22 loc) · 809 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# check to see if the FIFTYONE_DIR is set otherwise print an error and exit
if [ -z "$FIFTYONE_DIR" ]; then
echo "FIFTYONE_DIR is not set. Please set FIFTYONE_DIR to the directory where you cloned the FiftyOne repo"
exit 1
fi
# check to see if yarn is installed
if ! command -v yarn &> /dev/null
then
echo "yarn could not be found. Please install yarn before continuing"
exit 1
fi
# check to see if yarn is at least version 3.x.x
if [ "$(yarn --version | cut -d. -f1)" -lt 3 ]; then
echo "yarn version 3.x.x is required. Please upgrade yarn before continuing"
exit 1
fi
echo "Installing dependencies with yarn..."
# if --link-only is not set run the yarn install command
if [ "$1" != "--link-only" ]; then
yarn install
fi
yarn link $FIFTYONE_DIR/app --all --private --relative