forked from LostCityRS/Server
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.sh
More file actions
executable file
·30 lines (24 loc) · 766 Bytes
/
start.sh
File metadata and controls
executable file
·30 lines (24 loc) · 766 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
28
29
30
#!/bin/sh
if ! command -v git 2>&1 >/dev/null; then
echo You must install Git to proceed
exit 1
fi
if ! command -v bun 2>&1 >/dev/null; then
echo You must install Bun to proceed
exit 1
fi
if ! command -v java 2>&1 >/dev/null; then
echo You must install Java 17 or newer to proceed
exit 1
fi
# todo: this can return a non-empty string and fail on macOS
# "The operation couldn’t be completed. Unable to locate a Java Runtime.
# Please visit http://www.java.com for information on installing Java."
jver=$(java -version 2>&1 | head -1 | cut -d'"' -f2 | sed '/^1\./s///' | cut -d'.' -f1)
if [ "$jver" -lt 17 ]; then
echo You must install Java 17 or newer to proceed
echo And it must be your primary Java version!
exit 1
fi
bun install
bun run start.ts