Save #2:
Changes: Added Interactive shell for : uninstall New feature: repair Small tweaks. Fedora script has been fixed.
This commit is contained in:
parent
cf86832877
commit
37c514523f
|
@ -0,0 +1,4 @@
|
|||
Added Interactive shell for : uninstall
|
||||
New feature: repair
|
||||
Small tweaks.
|
||||
Fedora script has been fixed.
|
|
@ -4,4 +4,5 @@
|
|||
- Improve Efficiency
|
||||
- Add flags to uninstall, reinstall, repair
|
||||
- Add flags to list a distrubution, and list help
|
||||
-GUI version (Released 5.0)
|
||||
-GUI version (Released 5.0)
|
||||
-Build wine and install
|
|
@ -1,8 +1,10 @@
|
|||
while getopts ":v:" opt; do
|
||||
log_path =""
|
||||
while getopts ":vl:" opt; do
|
||||
case $opt in
|
||||
v)
|
||||
echo "4.0.1"
|
||||
;;
|
||||
|
||||
\?)
|
||||
echo "Invalid option: -$OPTARG" >&2
|
||||
echo "-v Displays the version"
|
||||
|
@ -83,6 +85,7 @@ echo "1)Stable build (Recommended)"
|
|||
echo "2)Development build (Recommended for testing use only)"
|
||||
echo "3)Staging build (Recommended for testing use only)"
|
||||
read -p "Select build channel:" build -n 1 -r
|
||||
|
||||
if [ "$build" = "1" ]
|
||||
build = "stable"
|
||||
fi
|
||||
|
@ -99,10 +102,10 @@ if [[ $REPLY =~ ^[Yy]$ ]]
|
|||
spin &
|
||||
SPIN_PID=$!
|
||||
trap "kill -9 $SPIN_PID" `seq 0 15`
|
||||
sudo apt install winehq-"$build" winetricks &> ./logs/installLog.txt
|
||||
sudo apt install winehq-"$build" winetricks &> ./logs/installLog.txt || {echo "ERROR: dpkg locked" && exit 1}
|
||||
winecfg &> ./logs/configLog.txt
|
||||
else
|
||||
echo
|
||||
echo "Abort."
|
||||
fi
|
||||
echo "The logs can be found at" $(pwd)"/"
|
||||
echo "The logs can be found at" $(pwd)"/logs/"
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
RELEASE=$(lsb_release -sr)
|
||||
while getopts ":v:" opt; do
|
||||
case $opt in
|
||||
v)
|
||||
|
@ -11,7 +12,6 @@ while getopts ":v:" opt; do
|
|||
esac
|
||||
done
|
||||
|
||||
RELEASE=$(lsb_release -sr)
|
||||
spin()
|
||||
{
|
||||
spinner="/|\\-/|\\-"
|
||||
|
@ -36,7 +36,7 @@ echo "Enabling 32-bit support... "
|
|||
spin &
|
||||
SPIN_PID=$!
|
||||
trap "kill -9 $SPIN_PID" `seq 0 15`
|
||||
sudo dpkg --add-architecture i386
|
||||
sudo dpkg --add-architecture i386 || { echo 'ERROR: Unable to enable 32-bit support.' ; exit 1; }
|
||||
kill -9 $SPIN_PID
|
||||
|
||||
|
||||
|
@ -44,34 +44,18 @@ echo "Adding the repositories... "
|
|||
spin &
|
||||
SPIN_PID=$!
|
||||
trap "kill -9 $SPIN_PID" `seq 0 15`
|
||||
#Insert interactive shell here
|
||||
sudo add-apt-repository universe -y &>> ./logs/repoLog2.txt
|
||||
{
|
||||
if [ "$RELEASE" = "20.04" ]; then
|
||||
sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/focal/winehq-focal.sources
|
||||
if [ "$RELEASE" = "41" ]; then
|
||||
dnf5 config-manager addrepo --from-repofile=https://dl.winehq.org/wine-builds/fedora/41/winehq.repo
|
||||
sudo dnf update
|
||||
fi
|
||||
|
||||
if [ "$RELEASE" = "40" ]; then
|
||||
dnf config-manager --add-repo https://dl.winehq.org/wine-builds/fedora/40/winehq.repo
|
||||
sudo apt update
|
||||
fi
|
||||
|
||||
if [ "$RELEASE" = "22.04" ]; then
|
||||
sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/jammy/winehq-jammy.sources
|
||||
sudo apt update
|
||||
fi
|
||||
|
||||
if [ "$RELEASE" = "23.10" ]; then
|
||||
sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/mantic/winehq-mantic.sources
|
||||
sudo apt update
|
||||
fi
|
||||
|
||||
if [ "$RELEASE" = "23.04" ]; then
|
||||
sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/lunar/winehq-lunar.sources
|
||||
sudo apt update
|
||||
else
|
||||
echo "Unsupported release"
|
||||
fi
|
||||
sudo mkdir -pm755 /etc/apt/keyrings
|
||||
sudo wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
|
||||
sudo apt update
|
||||
} &> ./logs/repoLog.txt
|
||||
} &> ./logs/repoLog.txt || &> /dev/null
|
||||
kill -9 $SPIN_PID
|
||||
clear
|
||||
echo "1)Stable build (Recommended)"
|
||||
|
@ -94,10 +78,10 @@ if [[ $REPLY =~ ^[Yy]$ ]]
|
|||
spin &
|
||||
SPIN_PID=$!
|
||||
trap "kill -9 $SPIN_PID" `seq 0 15`
|
||||
sudo apt install winehq-"$build" winetricks &> ./logs/installLog.txt
|
||||
sudo dnf install winehq-"$build" winetricks &> ./logs/installLog.txt
|
||||
winecfg &> ./logs/configLog.txt
|
||||
else
|
||||
echo
|
||||
echo "Abort."
|
||||
fi
|
||||
echo "The logs can be found at" $(pwd)"/"
|
||||
echo "The logs can be found at" $(pwd)"/logs/"
|
||||
|
|
|
@ -101,4 +101,4 @@ else
|
|||
echo
|
||||
echo "Abort."
|
||||
fi
|
||||
echo "The logs can be found at" $(pwd)"/"
|
||||
echo "The logs can be found at" $(pwd)"/logs/"
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
echo "Backup Wine Cache?"
|
||||
read -p "Ready? [Y/n]: " -n 1 -r
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]
|
||||
then
|
||||
mv ~/.wine ~/.wine.bak
|
||||
fi
|
||||
|
||||
rm -r ~/.wine
|
||||
sudo apt-get purge wine
|
||||
|
||||
while getopts "vsdt" n
|
||||
do
|
||||
case "$n" in
|
||||
v) echo "1.0.0" ;;
|
||||
s) sudo apt-get purge winehq-stable
|
||||
sudo apt-get install winehq-devel;;
|
||||
d) sudo apt-get purge winehq-devel
|
||||
sudo apt-get install winehq-devel;;
|
||||
t) sudo apt-get purge winehq-devel
|
||||
sudo apt-get install winehq-devel;;
|
||||
\?) usage;;
|
||||
esac
|
||||
done
|
|
@ -1,3 +1,4 @@
|
|||
path=$(pwd)
|
||||
spin()
|
||||
{
|
||||
spinner="/|\\-/|\\-"
|
||||
|
@ -11,23 +12,32 @@ spin()
|
|||
done
|
||||
done
|
||||
}
|
||||
read -p "Are you sure to uninstall wine? [Y/n]: " -n 1 -r
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]
|
||||
then
|
||||
read -p "Backup wine cache? [Y/n]: " -n 1 -r
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]
|
||||
then
|
||||
mv ~/.wine ~/.wine.bak
|
||||
fi
|
||||
cd $HOME
|
||||
echo "Uninstalling Wine... "
|
||||
{
|
||||
spin &
|
||||
SPIN_PID=$!
|
||||
trap "kill -9 $SPIN_PID" `seq 0 15`
|
||||
rm -r .wine
|
||||
rm .config/menus/applications-merged/wine*
|
||||
rm -r .local/share/applications/wine
|
||||
rm .local/share/desktop-directories/wine*
|
||||
rm .local/share/icons/????_*.xpm
|
||||
sudo apt purge --autoremove winehq-stable -y
|
||||
sudo apt-get update
|
||||
sudo apt-get autoclean -y
|
||||
sudo apt-get clean -y
|
||||
sudo apt-get autoremove -y
|
||||
} &> /dev/null
|
||||
|
||||
cd $HOME
|
||||
echo "Uninstalling Wine... "
|
||||
{
|
||||
spin &
|
||||
SPIN_PID=$!
|
||||
trap "kill -9 $SPIN_PID" `seq 0 15`
|
||||
rm -r .wine
|
||||
rm .config/menus/applications-merged/wine*
|
||||
rm -r .local/share/applications/wine
|
||||
rm .local/share/desktop-directories/wine*
|
||||
rm .local/share/icons/????_*.xpm
|
||||
sudo apt purge --autoremove winehq-stable -y
|
||||
sudo apt-get update
|
||||
sudo apt-get autoclean -y
|
||||
sudo apt-get clean -y
|
||||
sudo apt-get autoremove -y
|
||||
} &> /dev/null
|
||||
|
||||
kill -9 $SPIN_PID
|
||||
kill -9 $SPIN_PID
|
||||
cd $path || exit 1
|
||||
fi
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
echo "GUI releasing soon in 5.0 update"
|
|
@ -36,4 +36,5 @@ while getopts 'abf:v' flag; do
|
|||
*) print_usage
|
||||
exit 1 ;;
|
||||
esac
|
||||
done
|
||||
done
|
||||
echo
|
Loading…
Reference in New Issue