-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: deprecate windows and prefer wsl
- Loading branch information
1 parent
bcf3f99
commit 78b2311
Showing
5 changed files
with
95 additions
and
74 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
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,50 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
echo "Welcome to the pfcreator installer!" | ||
echo "This script will install pfcreator on your system." | ||
RELEASE_URL="https://github.com/UndiedGamer/pfcreator/releases/download/v1.0.0" | ||
|
||
TEMP_DIR=$(mktemp -d) | ||
trap 'rm -rf "$TEMP_DIR"' EXIT | ||
|
||
OS=$(uname -s | tr '[:upper:]' '[:lower:]') | ||
ARCH=$(uname -m) | ||
|
||
TARBALL="" | ||
if [ "$OS" = "linux" ]; then | ||
if [ "$ARCH" = "x86_64" ]; then | ||
TARBALL="pfcreator-linux-x86_64.tar.gz" | ||
elif [ "$ARCH" = "arm64" ]; then | ||
TARBALL="pfcreator-linux-aarch64.tar.gz" | ||
fi | ||
elif [ "$OS" = "darwin" ]; then | ||
TARBALL="pfcreator-darwin-aarch64.tar.gz" | ||
else | ||
echo "Unsupported OS: $OS" | ||
exit 1 | ||
fi | ||
|
||
if [ -z "$TARBALL" ]; then | ||
echo "Unsupported architecture: $ARCH" | ||
exit 1 | ||
fi | ||
|
||
echo "Downloading $TARBALL..." | ||
curl -fsSL "$RELEASE_URL/$TARBALL" -o "$TEMP_DIR/$TARBALL" | ||
|
||
echo "Extracting $TARBALL..." | ||
tar -xzf "$TEMP_DIR/$TARBALL" -C "$TEMP_DIR" | ||
|
||
echo "Installing binaries..." | ||
for binary in "$TEMP_DIR"/*/*; do | ||
if [ -x "$binary" ] && [ ! -d "$binary" ]; then | ||
echo "Copying $(basename "$binary") to /usr/local/bin" | ||
sudo cp "$binary" /usr/local/bin/ | ||
sudo chmod +x "/usr/local/bin/$(basename "$binary")" | ||
fi | ||
done | ||
|
||
echo "pfcreator has been successfully installed!" | ||
exit 0 |
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