forked from turtlesec-no/get-ninja
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Install ninja binary directly from its repository
- Loading branch information
Showing
4 changed files
with
58 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
daa94231f55bf32a46b1b45e3a0dc767f73483a681d3277923833df9ac4f12532d67e9aca2f45768f31c8b3b8e63149d69867cb0a0e6c48683f197bf2634d681 ninja-linux-aarch64.zip | ||
a6d4c8410cc7cd0eced47518b8deca90af9e6f9b1e9fba992bcc5bc92645d07e20bd005a59c90c4c24cded68a4f2178f3a2043707e578e326881ffdaae073f2f ninja-linux.zip | ||
cb271573df79c36a61bf6f63ff7aca7e2e7e3764c1ef0ce8e6f4667dae54326f905061cf56f19aea37625c94eeb96abc8f643b14d0e65da70e2e6cf9d127a52a ninja-win.zip | ||
23726030fa0ffd05afef6cf75042ad7518fb954af058f85a8a3fdab4e8d157ef42347b6232d20c1a609e91d9c38ebfd2f1cdc751ca6eb1f87e333cc6971455a5 ninja-mac.zip | ||
35b9228d91c133eabf8318b0842d6621be7b11ffaa46bfc3cf0cfe9aa5858c2db7b5dc7c475444f0da8cd07b35304e0c61f53cf264f258a6902c74b26438c248 ninja-winarm64.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#! /bin/bash | ||
|
||
echo "Runner $RUNNER_OS $RUNNER_ARCH" | ||
|
||
wget=wget | ||
if [ "$RUNNER_OS" == "Windows" ]; then | ||
if [ "$RUNNER_ARCH" == "ARM64" ]; then | ||
filename=ninja-winarm64.zip | ||
else | ||
filename=ninja-win.zip | ||
fi | ||
wget=C:/msys64/usr/bin/wget.exe | ||
checksum=sha512sum | ||
elif [ "$RUNNER_OS" == "macOS" ]; then | ||
filename=ninja-mac.zip | ||
checksum="shasum -a 512" | ||
elif [ "$RUNNER_OS" == "Linux" ]; then | ||
if [ "$RUNNER_ARCH" == "ARM64" ]; then | ||
filename=ninja-linux-aarch64.zip | ||
else | ||
filename=ninja-linux.zip | ||
fi | ||
checksum="sha512sum" | ||
else | ||
echo "$RUNNER_OS not supported" | ||
exit 1 | ||
fi | ||
if ! $wget -q "https://github.com/ninja-build/ninja/releases/download/v1.12.0/$filename" ; then | ||
echo "Couldn't download $filename file" | ||
exit 2 | ||
fi | ||
|
||
echo 1. ls $GITHUB_ACTION_PATH | ||
ls $GITHUB_ACTION_PATH | ||
|
||
echo 2. pwd | ||
pwd | ||
|
||
echo 3. ls . | ||
ls . | ||
|
||
if ! $checksum --ignore-missing --check $GITHUB_ACTION_PATH/checksums.txt ; then | ||
echo "Invalid SHA512 checksum" | ||
exit 3 | ||
fi | ||
mkdir -p "$HOME/.local/bin" | ||
unzip -d "$HOME/.local/bin" "$filename" |