forked from PikaBotz/Anya_v2-MD
-
Notifications
You must be signed in to change notification settings - Fork 0
/
start.sh
42 lines (39 loc) · 834 Bytes
/
start.sh
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
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
# Function to detect the hosting platform
detect_platform() {
if [[ "$(uname)" == "Linux" ]]; then
echo "Linux"
elif [[ "$(uname)" == "Darwin" ]]; then
echo "macOS"
elif [[ "$(uname)" == "replit" ]]; then
echo "replit"
elif [ ! -z "$REPLIT" ]; then
echo "Replit"
else
echo "Unknown"
fi
}
# Get the platform
platform=$(detect_platform)
# Run different code based on the platform
case $platform in
"Linux")
echo " Linux OS Platform Detected"
yarn install && yarn start
;;
"macOS")
echo "Mac OS Platform Detected"
yarn install && yarn start
;;
"replit")
echo "Replit Platform Detected"
yarn && yarn start
;;
"Replit")
echo "Replit Platform Detected"
yarn install && yarn start
;;
"Unknown")
echo "Unsupported platform"
;;
esac