From 8158555b81216a8da4a46800ceae0c3556061e56 Mon Sep 17 00:00:00 2001 From: Tumble Date: Sat, 13 Jan 2024 10:40:16 +0000 Subject: [PATCH] added readme file and void dependancy install --- README.md | 14 ++++++++++++++ install.sh | 19 ++++++++++++++++--- 2 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..9ec14e3 --- /dev/null +++ b/README.md @@ -0,0 +1,14 @@ +# Beat Saber One Click + +Sets up the one click istall for linux on websites such as +* https://beatsaver.com +* https://bsaber.com/ + +## Dependancies +* wget - downloading the song map files +* unzip - extracting the song map files +* jq - reading the song name from the `info.dat` + +## Installation instructions +1. Run `install.sh` - [How-to: Run a bash shell script](https://ss64.com/bash/syntax-script.html) +1. Make sure `export BEATSABER_DIR=/path/to/steam/common/Beat Saber` exists in your `.profile` or `.bash_prosile` files \ No newline at end of file diff --git a/install.sh b/install.sh index 916699c..5ccbd93 100755 --- a/install.sh +++ b/install.sh @@ -1,4 +1,8 @@ #!/bin/sh +SUDO=sudo +if which doas 1> /dev/null 2> /dev/null; then +SUDO=doas +fi install_deps() { echo "Installing dependacies" @@ -6,19 +10,28 @@ install_deps() { # Debian if which apt 1> /dev/null 2> /dev/null; then echo "installing wget, unzip and jq from apt (sudo apt install wget unzip jq)" - sudo apt install wget unzip jq + $SUDO apt install wget unzip jq return fi # Arch if which pacman 1> /dev/null 2> /dev/null; then echo "installing wget, unzip and jq from pacman (sudo pacman -S --needed wget unzip jq)" - sudo pacman -S --needed wget unzip jq + $SUDO pacman -S --needed wget unzip jq return fi + + + # Void + if which xbps-install 1> /dev/null 2> /dev/null; then + echo "installing wget, unzip and jq from xbps (sudo xbps-install -Su wget unzip jq)" + $SUDO xbps-install -Su wget unzip jq + return + fi + echo "Linux distro not supported (yet)" lsb_release -a - exit 1 + #exit 1 } install_deps