Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- tempfile=`tempfile 2>/dev/null` || tempfile=/tmp/test$$
- dialog --menu "This program 'fixes' Steam when it fails to open." 12 63 5 1 "Delete conflicting files" 2 "Delete conflicting files (if 1 doesn't)" 3 "Restore files deleted by this program" 4 "Install Steam then remove conflicting files (x86_64)" 5 "Install Steam then remove conflicting files (i686)" 2>$tempfile
- if [ "$?" = "0" ]
- then
- _return=$(cat $tempfile)
- if [ "$_return" = "1" ]
- then
- clear
- echo Files deleted:
- find ~/.steam/root/ \( -name "libgcc_s.so*" -o -name "libstdc++.so*" -o -name "libxcb.so*" -o -name "libgpg-error.so*" \) -print -delete
- echo Conflicting files have now been deleted. | lolcat
- fi
- if [ "$_return" = "2" ]
- then
- clear
- echo Files deleted:
- find ~/.local/share/Steam/ \( -name "libgcc_s.so*" -o -name "libstdc++.so*" -o -name "libxcb.so*" -o -name "libgpg-error.so*" \) -print -delete
- echo Conflicting files have now been deleted. | lolcat
- fi
- if [ "$_return" = "3" ]
- then
- clear
- steam --reset
- echo Files deleted by this program have now been restored. | lolcat
- fi
- if [ "$_return" = "4" ]
- then
- clear
- echo Downloading Steam package... 2.59MiB
- sudo mv ./index.html ./index.html.bak
- sudo wget https://www.archlinux.org/packages/multilib/x86_64/steam/download/
- sudo pacman -U ./index.html
- sudo rm ./index.html
- sudo mv ./index.html.bak ./index.html
- echo Steam installed, opening Steam, it should update. | lolcat
- sleep 1
- steam
- echo Steam has now installed and updated, deleting conflicting libraries now. | lolcat
- sudo killall steam
- echo Files deleted:
- find ~/.steam/root/ \( -name "libgcc_s.so*" -o -name "libstdc++.so*" -o -name "libxcb.so*" -o -name "libgpg-error.so*" \) -print -delete
- find ~/.local/share/Steam/ \( -name "libgcc_s.so*" -o -name "libstdc++.so*" -o -name "libxcb.so*" -o -name "libgpg-error.so*" \) -print -delete
- echo Conflicting files have now been deleted. | lolcat
- echo Steam should now be installed and working properly!
- fi
- if [ "$_return" = "5" ]
- then
- clear
- echo Downloading Steam package... 2.59MiB
- sudo mv ./index.html ./index.html.bak
- sudo wget https://www.archlinux.org/packages/community/i686/steam/download/
- sudo pacman -U ./index.html
- sudo rm ./index.html
- sudo mv ./index.html.bak ./index.html
- echo Steam installed, opening Steam, it should update. | lolcat
- sleep 1
- steam
- echo Steam has now installed and updated, deleting conflicting libraries now. | lolcat
- sudo killall steam
- echo Files deleted:
- find ~/.steam/root/ \( -name "libgcc_s.so*" -o -name "libstdc++.so*" -o -name "libxcb.so*" -o -name "libgpg-error.so*" \) -print -delete
- find ~/.local/share/Steam/ \( -name "libgcc_s.so*" -o -name "libstdc++.so*" -o -name "libxcb.so*" -o -name "libgpg-error.so*" \) -print -delete
- echo Conflicting files have now been deleted. | lolcat
- echo Steam should now be installed and working properly!
- fi
- else
- clear
- echo Exiting program. | lolcat
- fi
- rm -f $tempfile
Add Comment
Please, Sign In to add comment