mirror of
https://github.com/Equicord/Equicord.git
synced 2025-01-18 05:13:29 -05:00
Installer script changes (#108)
* Update README.md Custom URLs for the install script * Update README.md Mirrors because running the script from github is giving me problems (ratelimit or something i have no clue) * Update install.sh * Update README.md * Fix Readme --------- Co-authored-by: thororen1234 <thororen1234@users.noreply.github.com> Co-authored-by: thororen <78185467+thororen1234@users.noreply.github.com>
This commit is contained in:
parent
5da4bd72a8
commit
8f824472bc
2 changed files with 17 additions and 6 deletions
|
@ -190,6 +190,7 @@ Linux
|
||||||
```shell
|
```shell
|
||||||
sh -c "$(curl -sS https://raw.githubusercontent.com/Equicord/Equicord/refs/heads/main/misc/install.sh)"
|
sh -c "$(curl -sS https://raw.githubusercontent.com/Equicord/Equicord/refs/heads/main/misc/install.sh)"
|
||||||
```
|
```
|
||||||
|
|
||||||
## Installing Equicord Devbuild
|
## Installing Equicord Devbuild
|
||||||
|
|
||||||
### Dependencies
|
### Dependencies
|
||||||
|
|
|
@ -1,36 +1,44 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Exit immediately if a command exits with a non-zero status
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# Check if the script is run as root
|
||||||
if [ "$(id -u)" -eq 0 ]; then
|
if [ "$(id -u)" -eq 0 ]; then
|
||||||
echo "Run me as a normal user, not root!"
|
echo "Run this script as a normal user, not root!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Define variables
|
||||||
installer_path="$HOME/.equilotl"
|
installer_path="$HOME/.equilotl"
|
||||||
github_url="https://github.com/Equicord/Equilotl/releases/latest/download/EquilotlCli-Linux"
|
github_url="https://github.com/Equicord/Equilotl/releases/latest/download/EquilotlCli-Linux"
|
||||||
|
|
||||||
|
# Inform user about the update check
|
||||||
echo "Checking if the installer needs updating..."
|
echo "Checking if the installer needs updating..."
|
||||||
|
|
||||||
|
# Fetch the latest modified date from the server
|
||||||
|
latest_modified=$(curl -sI "$github_url" | grep -i "last-modified" | cut -d' ' -f2-)
|
||||||
|
|
||||||
latest_modified=$(curl -sI "https://github.com/Equicord/Equilotl/releases/latest/download/EquilotlCli-Linux" | grep -i "last-modified" | cut -d' ' -f2-)
|
# Check if the installer exists locally
|
||||||
|
|
||||||
if [ -f "$installer_path" ]; then
|
if [ -f "$installer_path" ]; then
|
||||||
|
# Get the local file's last modified date
|
||||||
local_modified=$(stat -c "%y" "$installer_path" | cut -d' ' -f1-2)
|
local_modified=$(stat -c "%y" "$installer_path" | cut -d' ' -f1-2)
|
||||||
|
|
||||||
|
# Compare the local file's date with the server's latest modified date
|
||||||
if [ "$local_modified" = "$latest_modified" ]; then
|
if [ "$local_modified" = "$latest_modified" ]; then
|
||||||
echo "The installer is up-to-date."
|
echo "The installer is up-to-date."
|
||||||
else
|
else
|
||||||
echo "The installer is outdated. Downloading the latest version..."
|
echo "The installer is outdated. Downloading the latest version..."
|
||||||
curl -sSL "https://github.com/Equicord/Equilotl/releases/latest/download/EquilotlCli-Linux" --output "$installer_path"
|
curl -sSL "$github_url" --output "$installer_path"
|
||||||
chmod +x "$installer_path"
|
chmod +x "$installer_path"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "Installer not found. Downloading it..."
|
echo "Installer not found. Downloading it..."
|
||||||
curl -sSL "https://github.com/Equicord/Equilotl/releases/latest/download/EquilotlCli-Linux" --output "$installer_path"
|
curl -sSL "$github_url" --output "$installer_path"
|
||||||
chmod +x "$installer_path"
|
chmod +x "$installer_path"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Check for sudo or doas availability to run the installer with elevated privileges
|
||||||
if command -v sudo >/dev/null; then
|
if command -v sudo >/dev/null; then
|
||||||
echo "Running installer with sudo..."
|
echo "Running installer with sudo..."
|
||||||
sudo "$installer_path"
|
sudo "$installer_path"
|
||||||
|
@ -41,5 +49,7 @@ else
|
||||||
echo "Neither sudo nor doas were found. Please install one to proceed."
|
echo "Neither sudo nor doas were found. Please install one to proceed."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Provide script attribution
|
||||||
echo "Original script forked from Vencord"
|
echo "Original script forked from Vencord"
|
||||||
echo "Modified by PhoenixAceVFX & Crxaw for Equicord Updater"
|
echo "Modified by PhoenixAceVFX & Crxaw for Equicord Updater"
|
||||||
|
|
Loading…
Reference in a new issue