-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrun.sh
executable file
·37 lines (34 loc) · 856 Bytes
/
run.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
#!/usr/bin/env bash
read -ra SYSTEM_TYPE < <(uname -sm)
SYSTEM_TYPE=("${SYSTEM_TYPE[@],,}")
symlink() {
local lib
lib=$1
cd library && ln -s "${SYSTEM_TYPE[0]}_${SYSTEM_TYPE[1]}_${lib}.so" "${lib}.so" && cd - || exit 1
}
case ${SYSTEM_TYPE[0]} in
"linux")
case ${SYSTEM_TYPE[1]} in
"x86_64")
symlink "uuid"
symlink "fast_shuffle"
;;
*)
printf "%s\n" "ERROR: No ${SYSTEM_TYPE[1]} libraries are available"
printf "%s\n" " Please compile them with make"
;;
esac
;;
"darwin")
case ${SYSTEM_TYPE[1]} in
"x86_64" | "arm64")
symlink "uuid"
symlink "fast_shuffle"
;;
*)
printf "%s\n" "ERROR: No ${SYSTEM_TYPE[1]} libraries are available"
printf "%s\n" " Please compile them with make"
;;
esac
;;
esac