mirror of
https://github.com/GayPizzaSpecifications/foundation.git
synced 2025-08-03 05:30:55 +00:00
Fix install script and mark it as working.
This commit is contained in:
@ -15,13 +15,11 @@ server.
|
|||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
**These directions won't work for the time being.**
|
|
||||||
|
|
||||||
The following command downloads and runs a script that will fetch the latest update manifest, and
|
The following command downloads and runs a script that will fetch the latest update manifest, and
|
||||||
install all plugins available. It can also be used to update plugins to the latest version
|
install all plugins available. It can also be used to update plugins to the latest version
|
||||||
available.
|
available.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Always validate the contents of a script from the internet!
|
# Always validate the contents of a script from the internet!
|
||||||
bash -c "$(curl -sL https://git.mystic.run/minecraft/foundation/-/raw/main/install.sh)"
|
bash -c "$(curl -sL https://github.com/GayPizzaSpecifications/foundation/raw/main/install.sh)"
|
||||||
```
|
```
|
||||||
|
12
install.sh
12
install.sh
@ -7,8 +7,8 @@ echo
|
|||||||
|
|
||||||
# Ensure curl and jq are installed.
|
# Ensure curl and jq are installed.
|
||||||
if ! hash curl jq &> /dev/null; then
|
if ! hash curl jq &> /dev/null; then
|
||||||
echo "curl and jq must be installed"
|
echo "curl and jq must be installed"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Installing..."
|
echo "Installing..."
|
||||||
@ -20,11 +20,10 @@ if [ ! -d plugins ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Base GitLab update manifest.
|
# Base GitLab update manifest.
|
||||||
base_url="https://git.mystic.run/minecraft/foundation/-/jobs/artifacts/main/raw/"
|
base_url="https://artifacts.gay.pizza/foundation/"
|
||||||
query_params="job=build"
|
|
||||||
|
|
||||||
# Download the update manifest.
|
# Download the update manifest.
|
||||||
manifest=$(curl -Ls "$base_url/build/manifests/update.json?$query_params")
|
manifest=$(curl --fail -Ls "$base_url/build/manifests/update.json" || (echo "Failed to download manifest."; exit 1))
|
||||||
|
|
||||||
# Get plugins list from the manifest.
|
# Get plugins list from the manifest.
|
||||||
plugins=$(echo "$manifest" | jq -r 'keys | .[]')
|
plugins=$(echo "$manifest" | jq -r 'keys | .[]')
|
||||||
@ -40,5 +39,6 @@ do
|
|||||||
echo "Installing $plugin v$version to $dl_path"
|
echo "Installing $plugin v$version to $dl_path"
|
||||||
|
|
||||||
# Download the plugin and store it at the mentioned path.
|
# Download the plugin and store it at the mentioned path.
|
||||||
curl -Ls "$base_url/$artifact_path?$query_params" --output "$dl_path"
|
curl --fail -Ls "$base_url/$artifact_path" --output "$dl_path" || (echo "Failed to download ${artifact_path}"; exit 1)
|
||||||
done
|
done
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user