Skip to content

Instantly share code, notes, and snippets.

@mokiding
Created July 31, 2024 22:16
Show Gist options
  • Save mokiding/d2d132bb1a529c17e8b6694783deea41 to your computer and use it in GitHub Desktop.
Save mokiding/d2d132bb1a529c17e8b6694783deea41 to your computer and use it in GitHub Desktop.
#!/bin/bash
# URL of the .deb file
DEB_URL="https://github.com/Mastermindzh/tidal-hifi/releases/download/5.15.0/tidal-hifi_5.15.0_amd64.deb"
# Output file name
DEB_FILE="tidal-hifi_5.15.0_amd64.deb"
# Download the .deb file
echo "Downloading $DEB_FILE..."
wget -O "$DEB_FILE" "$DEB_URL"
# Check if the download was successful
if [ $? -ne 0 ]; then
echo "Download failed!"
exit 1
fi
# Install the .deb file
echo "Installing $DEB_FILE..."
sudo dpkg -i "$DEB_FILE"
# Check if the installation was successful
if [ $? -ne 0 ]; then
echo "Installation failed! Attempting to fix dependencies..."
sudo apt-get install -f
fi
# Clean up the downloaded .deb file
echo "Cleaning up..."
rm "$DEB_FILE"
echo "Done!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment