Skip to content
This repository was archived by the owner on Nov 23, 2024. It is now read-only.

Commit 6d7be4a

Browse files
committed
Minor updates
1 parent fa6ccb8 commit 6d7be4a

File tree

1 file changed

+11
-20
lines changed

1 file changed

+11
-20
lines changed

wine-tkg-git-updater.sh

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,21 @@
11
#!/bin/sh
22

33
# Find the latest release url and filename (just like in the other scripts)
4-
url="$(curl -s 'https://api.github.com/repos/Frogging-Family/wine-tkg-git/releases/latest' | grep 'browser_download_url' | grep 'staging' | cut -d \" -f 4)"
5-
filename="$(echo '$url' | sed 's|.*/||')"
6-
7-
# Optionally download the package/do not directly install from remote
8-
# (not needed when directly installing using pacman)
9-
# curl -LOJ "$url"
4+
url="$(curl -s "https://api.github.com/repos/Frogging-Family/wine-tkg-git/releases/latest" | grep "browser_download_url" | grep "staging" | cut -d \" -f 4)"
105

116
# Download the latest version and install it using pacman
127
echo "--> Downloading and installing the latest wine-tkg..."
138

149
if [ "$(id -u)" = "0" ]; then
15-
echo "--> Installing as root..."
16-
echo -e "\e[90m"
17-
pacman --needed -U "$url"
18-
echo -e "\e[0m"
19-
elif [ $(which sudo) ]; then
20-
echo "--> Not running as root. Trying to elevate through sudo..."
21-
echo -e "\e[90m"
22-
sudo pacman --needed -U "$url"
23-
echo -e "\e[0m"
10+
echo "--> Installing as root..."
11+
echo
12+
pacman --needed -U "$url"
13+
echo
14+
elif [ "$(which sudo)" ]; then
15+
echo "--> Not running as root. Trying to elevate through sudo..."
16+
echo
17+
sudo pacman --needed -U "$url"
18+
echo
2419
else
25-
echo "--> Error: Please run the script with root privileges."
20+
echo "--> Error: Please run the script with root privileges."
2621
fi
27-
28-
# Cleanup (not needed when directly installing using pacman)
29-
# echo "--> Cleaning up..."
30-
# rm "$filename"

0 commit comments

Comments
 (0)