diff --git a/install.sh b/install.sh index d60f120..5450cd1 100755 --- a/install.sh +++ b/install.sh @@ -7,46 +7,24 @@ if [ "$(id -u)" -eq 0 ]; then fi outfile=$(mktemp) -trap 'rm -rf "$outfile"' EXIT +trap 'rm -f "$outfile"' EXIT echo "Downloading Installer..." set -- "XDG_CONFIG_HOME=$XDG_CONFIG_HOME" -kind=wayland -if [ -z "$WAYLAND_DISPLAY" ]; then - echo "X11 detected" - kind=x11 -else - echo "Wayland detected" - set -- "$@" "XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR" "WAYLAND_DISPLAY=$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY" -fi -curl -sS https://github.com/Vendicated/VencordInstaller/releases/latest/download/VencordInstaller-$kind \ +curl -sS https://github.com/Vendicated/VencordInstaller/releases/latest/download/VencordInstallerCli-Linux \ --output "$outfile" \ --location chmod +x "$outfile" -echo -echo "Now running VencordInstaller" -echo "Do you want to run as root? [Y|n]" -echo "This is necessary if Discord is in a root owned location like /usr/share or /opt" -printf "> " -read -r runAsRoot - -opt="$(echo "$runAsRoot" | tr "[:upper:]" "[:lower:]")" - -if [ -z "$opt" ] || [ "$opt" = y ] || [ "$opt" = yes ]; then - if command -v sudo >/dev/null; then - echo "Running with sudo" - sudo env "$@" "$outfile" - elif command -v doas >/dev/null; then - echo "Running with doas" - doas env "$@" "$outfile" - else - echo "Neither sudo nor doas were found. Please install either of them to proceed." - fi +if command -v sudo >/dev/null; then + echo "Running with sudo" + sudo env "$@" "$outfile" +elif command -v doas >/dev/null; then + echo "Running with doas" + doas env "$@" "$outfile" else - echo "Running unprivileged" - "$outfile" + echo "Neither sudo nor doas were found. Please install either of them to proceed." fi