mihomo/docker/file-name.sh

25 lines
455 B
Bash
Raw Permalink Normal View History

2023-01-25 20:53:39 +08:00
#!/bin/sh
2023-11-03 21:01:45 +08:00
os="mihomo-linux-"
2023-03-01 13:41:25 +08:00
case $TARGETPLATFORM in
"linux/amd64")
2023-01-25 20:53:39 +08:00
arch="amd64-compatible"
;;
2023-03-01 13:41:25 +08:00
"linux/386")
arch="386"
2023-01-25 20:53:39 +08:00
;;
2023-03-01 13:41:25 +08:00
"linux/arm64")
2023-01-25 20:53:39 +08:00
arch="arm64"
;;
2023-03-01 13:41:25 +08:00
"linux/arm/v7")
2023-01-25 20:53:39 +08:00
arch="armv7"
;;
"riscv64")
2023-03-01 13:41:25 +08:00
arch="riscv64"
2023-01-25 20:53:39 +08:00
;;
*)
echo "Unknown architecture"
exit 1
;;
esac
2023-03-01 13:41:25 +08:00
file_name="$os$arch-$(cat bin/version.txt)"
2023-01-25 20:53:39 +08:00
echo $file_name