File tree Expand file tree Collapse file tree 2 files changed +43
-2
lines changed
Expand file tree Collapse file tree 2 files changed +43
-2
lines changed Original file line number Diff line number Diff line change @@ -5,8 +5,11 @@ Light Train (SLT)](https://trains.chuniversiteit.nl/#slt).
55## Installation
66
77### macOS 10.12+ / Linux (x64, ARM)
8- Download the latest binary for your platform from the Releases page. Make the
9- binary executable using ` chmod +x $fileName ` and move the binary to ` /usr/local/bin/slt ` .
8+ Paste and execute the following command in a terminal window:
9+
10+ ```
11+ /bin/bash -c "$(curl -L https://raw.githubusercontent.com/chunfeilung/slt/main/install.sh)"
12+ ```
1013
1114### Windows
1215> :warning : slt may not display properly in cmd.exe. Please use Windows Terminal
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ set -e
4+
5+ # Grab base download URL for latest release
6+ BASE_DOWNLOAD_URL=$( curl -Ls https://api.github.com/repos/chunfeilung/slt/releases/latest \
7+ | grep browser_download_url \
8+ | grep linux-x64 \
9+ | sed -re ' s/(.+)"(http.+)-linux-x64"/\2/' )
10+
11+ # Determine the right postfix for this runtime platform
12+ if [[ " $OSTYPE " == " darwin" * ]]; then
13+ BINARY_DOWNLOAD_URL=" ${BASE_DOWNLOAD_URL} -osx-x64"
14+
15+ else
16+ if [[ $( uname -m) == * " x86_64" * ]]; then
17+ libc=$( ldd /bin/ls | grep ' musl' | head -1 | cut -d ' ' -f1)
18+ if [ -z $libc ]; then
19+ BINARY_DOWNLOAD_URL=" ${BASE_DOWNLOAD_URL} -linux-x64"
20+ else
21+ BINARY_DOWNLOAD_URL=" ${BASE_DOWNLOAD_URL} -linux-musl-x64"
22+ fi
23+
24+ elif [[ $( uname -m) == * " arm64" * ]] || [[ $( uname -m) == * " aarch64" * ]]; then
25+ BINARY_DOWNLOAD_URL=" ${BASE_DOWNLOAD_URL} -linux-arm64"
26+
27+ else
28+ echo " This runtime platform is currently not supported. :("
29+ exit 1
30+ fi
31+ fi
32+
33+ # Download and install the program
34+ curl -sL $BINARY_DOWNLOAD_URL > /tmp/slt
35+ chmod +x /tmp/slt
36+ mv /tmp/slt /usr/local/bin/slt
37+ /usr/local/bin/slt --speed 10
38+ echo ' Installation is complete! :-)' ;
You can’t perform that action at this time.
0 commit comments