Skip to content

Commit

Permalink
Changes to be committed:
Browse files Browse the repository at this point in the history
	modified:   README.md
	modified:   wine-installer-ubuntu.sh
    new file:   wine-script-updater.sh
  • Loading branch information
RishonDev committed Mar 9, 2023
1 parent e360e87 commit e24f707
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 5 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@ sudo apt install wget
wget https://raw.githubusercontent.com/RishonDev/get-wine-latest.sh/main/wine-installer-ubuntu.sh
chmod +x wine-installer-ubuntu.sh
./wine-installer-ubuntu.sh
```

```
19 changes: 16 additions & 3 deletions wine-installer-ubuntu.sh
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
#!/bin/bash
while getopts ":v:" opt; do
case $opt in
v)
echo "2.1.0"
;;
\?)
echo "Invalid option: -$OPTARG" >&2
echo "-v Displays the version"
exit 1
;;
esac
done

RELEASE=$(lsb_release -sr)
spin()
Expand All @@ -21,15 +33,15 @@ touch ./logs/repoLog.txt
touch ./logs/repoLog2.txt
touch ./logs/installLog.txt
touch ./logs/configLog.txt
echo "Enabling 32-bit support..."
echo "Enabling 32-bit support... "
spin &
SPIN_PID=$!
trap "kill -9 $SPIN_PID" `seq 0 15`
sudo dpkg --add-architecture i386
kill -9 $SPIN_PID


echo "Adding the repositories..."
echo "Adding the repositories... "
spin &
SPIN_PID=$!
trap "kill -9 $SPIN_PID" `seq 0 15`
Expand Down Expand Up @@ -57,9 +69,10 @@ fi
} &> ./logs/repoLog.txt
kill -9 $SPIN_PID

read -p "Install wine? [Y/n]:" -n 1 -r
read -p "Install wine? [Y/n]: " -n 1 -r
if [[ $REPLY =~ ^[Yy]$ ]]
then
echo
spin &
SPIN_PID=$!
trap "kill -9 $SPIN_PID" `seq 0 15`
Expand Down
22 changes: 22 additions & 0 deletions wine-script-updater.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash
spin()
{
spinner="/|\\-/|\\-"
while :
do
for i in `seq 0 7`
do
echo -n "${spinner:$i:1}"
echo -en "\010"
sleep 0.1
done
done
}

echo "Updating script..."
spin &
SPIN_PID=$!
trap "kill -9 $SPIN_PID" `seq 0 15`
wget https://raw.githubusercontent.com/RishonDev/get-wine-latest.sh/v2.1.0/wine-installer-ubuntu.sh -O ./wine-installer-ubuntu.sh
kill -9 $SPIN_PID
echo "Done."

0 comments on commit e24f707

Please sign in to comment.