Spaces:
Paused
Paused
File size: 448 Bytes
08b6464 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | #!/bin/sh
set -e
apt-get update && apt-get install -y openssh-client curl
ARCH=$(uname -m)
case "$ARCH" in
x86_64) TTYD_ARCH="x86_64" ;;
aarch64) TTYD_ARCH="aarch64" ;;
armv7l) TTYD_ARCH="arm" ;;
*) echo "不支持的架构: $ARCH"; exit 1 ;;
esac
echo "下载 ttyd ($TTYD_ARCH)..."
curl -sL "https://github.com/tsl0922/ttyd/releases/latest/download/ttyd.${TTYD_ARCH}" -o /usr/local/bin/ttyd
chmod +x /usr/local/bin/ttyd
|