files
This commit is contained in:
commit
05ea08ec80
|
@ -0,0 +1,7 @@
|
|||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=Beat Saver One Click (beatsaver://)
|
||||
Exec=beat-saver.sh %u
|
||||
StartupNotify=false
|
||||
MimeType=x-scheme-handler/beatsaver;
|
||||
Terminal=true
|
|
@ -0,0 +1,31 @@
|
|||
#!/bin/bash
|
||||
INPUT=$1
|
||||
ID=`basename $INPUT`
|
||||
URL="https://api.beatsaver.com/download/key/${ID}"
|
||||
|
||||
if [ ! -n "${BEATSABER_DIR}" ]; then
|
||||
read -p "Press any key to start . . ."
|
||||
fi
|
||||
|
||||
if [ ! -n "${BEATSABER_DIR}" ]; then
|
||||
env|grep beat
|
||||
read -p 'Enter location to BeatSaber: ' BEATSABER_DIR
|
||||
echo "export BEATSABER_DIR=\"${BEATSABER_DIR}\"">>~/.bash_profile
|
||||
mkdir -p "${BEATSABER_DIR}/Beat Saber_Data/CustomLevels"
|
||||
fi
|
||||
|
||||
cd /tmp
|
||||
mkdir "beatsaver_${ID}"
|
||||
cd "beatsaver_${ID}"
|
||||
rm -rf *
|
||||
wget ${URL} -O map.zip
|
||||
unzip map.zip -d map
|
||||
cd map
|
||||
DIR_NAME="${ID} ($(cat Info.dat | jq -r ._songName))"
|
||||
cd ..
|
||||
mv map "${DIR_NAME}"
|
||||
cp -r "${DIR_NAME}" "${BEATSABER_DIR}/Beat Saber_Data/CustomLevels"
|
||||
|
||||
echo "----------------------------------------------------------------"
|
||||
echo "Installed: ${DIR_NAME}"
|
||||
echo "----------------------------------------------------------------"
|
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
cp beat-saver.desktop ~/.local/share/applications
|
||||
cp beat-saver.sh ~/.local/share/
|
||||
|
||||
|
||||
sed -i 's/beat-saver.sh/~\/.local\/share\/beat-saver.sh/' ~/.local/share/applications/beat-saver.desktop
|
Loading…
Reference in New Issue