Skip to content

Instantly share code, notes, and snippets.

@doggeddalle
Last active July 23, 2025 14:04
Show Gist options
  • Save doggeddalle/7db7a4988990ce7aa5d451c8976c81ab to your computer and use it in GitHub Desktop.
Save doggeddalle/7db7a4988990ce7aa5d451c8976c81ab to your computer and use it in GitHub Desktop.
tested for arch, gather the mod zip from sb innovation, place next to script, make script executable and run
#!/bin/bash
set -euo pipefail
### CONFIG ###
MOD_ZIP=$(ls BiglyBT_*.zip 2>/dev/null | head -n 1)
JRE_URL="https://github.com/adoptium/temurin23-binaries/releases/download/jdk-23.0.2%2B7/OpenJDK23U-jdk_x64_linux_hotspot_23.0.2_7.tar.gz"
INSTALLER_URL="https://files.biglybt.com/installer/BiglyBT_Installer.sh"
BIGLYBT_DIR="${HOME}/biglybt"
JRE_DIR="${BIGLYBT_DIR}/jre"
JRE_TAR="jre.tar.gz"
INSTALLER_SCRIPT="BiglyBT_Installer.sh"
VMOPTIONS="${HOME}/.biglybt/java.vmoptions"
################
echo "[+] Checking dependencies..."
# Ensure required tools exist
sudo pacman -Sy --needed --noconfirm wget unzip
if ! command -v java >/dev/null; then
echo "[+] Java not found. Installing jre8-openjdk..."
sudo pacman -S --noconfirm jre8-openjdk
fi
echo "[+] Downloading BiglyBT installer..."
wget -q --show-progress "$INSTALLER_URL" -O "$INSTALLER_SCRIPT"
chmod +x "$INSTALLER_SCRIPT"
echo "[+] Running BiglyBT installer..."
./"$INSTALLER_SCRIPT"
# BiglyBT must be installed interactively at this point.
echo "[*] Waiting for BiglyBT install to complete. Press enter when ready to continue."
read -r
if [[ ! -d "$BIGLYBT_DIR" ]]; then
echo "[-] BiglyBT directory not found at $BIGLYBT_DIR. Aborting."
exit 1
fi
### Extract BiglyBT mod
if [[ -f "$MOD_ZIP" ]]; then
echo "[+] Found mod zip: $MOD_ZIP"
unzip -o "$MOD_ZIP" -d "$BIGLYBT_DIR"
else
echo "[-] No BiglyBT_*.zip found in current directory. Aborting."
exit 1
fi
### Install JDK 23 to custom directory
echo "[+] Downloading Temurin JDK 23..."
wget -q --show-progress "$JRE_URL" -O "$JRE_TAR"
echo "[+] Extracting JDK to $JRE_DIR..."
mkdir -p "$JRE_DIR"
tar -xzvf "$JRE_TAR" --strip-components 1 -C "$JRE_DIR"
### Patch biglybt launch script
echo "[+] Patching BiglyBT launch script..."
sed -i -e '/^AUTOUPDATE_SCRIPT/ s/^.*/AUTOUPDATE_SCRIPT=0/' \
-e "/^JAVA_PROGRAM_DIR/ s|^.*|JAVA_PROGRAM_DIR=\"${JRE_DIR}/bin/\"|" \
"$BIGLYBT_DIR/biglybt"
### Patch vmoptions
echo "[+] Writing JVM options..."
mkdir -p "$(dirname "$VMOPTIONS")"
cat <<EOF >> "$VMOPTIONS"
--patch-module=java.base=ghostfucker_utils.jar
--add-exports=java.base/sun.net.www.protocol=ALL-UNNAMED
--add-exports=java.base/sun.net.www.protocol.http=ALL-UNNAMED
--add-exports=java.base/sun.net.www.protocol.https=ALL-UNNAMED
--add-opens=java.base/java.net=ALL-UNNAMED
-Dorg.glassfish.jaxb.runtime.v2.bytecode.ClassTailor.noOptimize=true
EOF
echo "[✔] BiglyBT mod setup complete."
echo "You can now run it with: gtk-launch biglybt or from your DE launcher."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment