File tree Expand file tree Collapse file tree 1 file changed +20
-21
lines changed
Expand file tree Collapse file tree 1 file changed +20
-21
lines changed Original file line number Diff line number Diff line change @@ -6,18 +6,21 @@ if [ ! -d /tmp/MPLCONFIGDIR ]; then
66 mkdir -p /tmp/MPLCONFIGDIR
77fi
88export MPLCONFIGDIR=/tmp/MPLCONFIGDIR
9- # Detect architecture
10- case " $( uname -m) " in
11- arm64|aarch64)
12- ARCH_TYPE=" aarch64"
13- ;;
14- x86_64)
15- ARCH_TYPE=" x64"
16- ;;
17- * )
18- show_error " Unsupported architecture: $( uname -m) "
19- exit 1
20- ;;
9+
10+ # === Detect OS and architecture ===
11+ OS_TYPE=$( echo " $( uname -s) " )
12+ ARCH_TYPE=$( uname -m)
13+ # Normalize OS name
14+ case " ${OS_TYPE} " in
15+ Darwin) OS_NAME=" macos" ;;
16+ Linux) OS_NAME=" linux" ;;
17+ * ) OS_NAME=$( echo " $OS_TYPE " | tr ' [:upper:]' ' [:lower:]' ) ;;
18+ esac
19+ # Normalize architecture name
20+ case " $ARCH_TYPE " in
21+ x86_64) ARCH_NAME=" amd64" ;;
22+ aarch64|arm64) ARCH_NAME=" arm64" ;;
23+ * ) ARCH_NAME=" $ARCH_TYPE " ;;
2124esac
2225
2326# Set dir name
@@ -35,16 +38,12 @@ FILE_CURL2_HTTPCODE="${DIR_LOG}/$(basename $0)__FILE_CURL2.http_code"
3538FILE_FDSNWS_NODES_URLS=" stationxml.conf"
3639
3740# Set software
38- # STATIONXML_TO_SEED="java -jar ./stationxml-converter-1.0.10.jar -s"
3941STATIONXML_TO_SEED=" java -jar ./stationxml-seed-converter-2.1.0.jar"
40- case " ${ARCH_TYPE} " in
41- aarch64)
42- RDSEED=" rdseed-aarch64"
43- ;;
44- x64)
45- RDSEED=" rdseed-amd64"
46- ;;
47- esac
42+ RDSEED=" rdseed-${OS_NAME} -${ARCH_NAME} "
43+ if [ ! -f /usr/bin/${RDSEED} ]; then
44+ echo " Error: rdseed executable not found for OS \" ${OS_NAME} \" and ARCH \" ${ARCH_NAME} \" ."
45+ exit 1
46+ fi
4847
4948# Set var
5049N_PROCESS_TO_GET_TYPE=20
You can’t perform that action at this time.
0 commit comments