mirror of
https://github.com/Nuzair46/SpotX-Linux.git
synced 2024-10-22 20:47:01 -06:00
26 lines
614 B
Bash
26 lines
614 B
Bash
|
#!/usr/bin/env bash
|
||
|
|
||
|
# Inital paths and filenames
|
||
|
INSTALL_PATH=$(readlink -e `type -p spotify`| rev | cut -d/ -f2- | rev)
|
||
|
XPUI_PATH="${INSTALL_PATH}/Apps"
|
||
|
XPUI_SPA="${XPUI_PATH}/xpui.spa"
|
||
|
XPUI_BAK="${XPUI_PATH}/xpui.bak"
|
||
|
|
||
|
# Detect client in PATH
|
||
|
if [[ ! -d "${INSTALL_PATH}" ]]; then
|
||
|
echo -e "\nSpotify not found in PATH. Exiting...\n"
|
||
|
exit; fi
|
||
|
|
||
|
# Check for backup file
|
||
|
if [[ ! -f "${XPUI_BAK}" ]]; then
|
||
|
echo -e "Backup file not found.\nExiting...\n"
|
||
|
exit
|
||
|
fi
|
||
|
|
||
|
# Uninstall patch
|
||
|
echo "Removing patch..."
|
||
|
rm "${XPUI_SPA}"
|
||
|
mv "${XPUI_BAK}" "${XPUI_SPA}"
|
||
|
|
||
|
echo -e "SpotX patch removed and backup restored!\n"
|