-
Notifications
You must be signed in to change notification settings - Fork 0
/
ge_update.sh
executable file
·59 lines (49 loc) · 1.3 KB
/
ge_update.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash
# this script gets the download link to the current GE proton
# version and extracts the tarball to .steam/root/compatibilitytools.d/.
# it also removes the tarball after extraction for cleanup
usage() {
echo
echo "Usage: ge_update.sh [option...]"
echo
echo "This script gets downloads the latest GE-proton tarball and"
echo "extracts it in the .steam/root/compatibilitytools.d/ dir"
echo
echo " -h, --help display this message"
echo
}
set -e
while [ "$1" != "" ]; do
case $1 in
-h | --help)
usage
exit
;;
*)
usage
exit 1
;;
esac
shift
done
echo "checking for avaliable updates"
can_update=$(python ge_query.py check)
if [ "$can_update" = "False" ]; then
echo "Already up to date!"
else
echo "grabbing url"
# grab the tarball url
tar_url=$(python ge_query.py url)
# grab the tarball name
tar_name=$(python ge_query.py name)
echo "navigating to .steam/root/compatibilitytools.d/"
cd /home/$USER/.steam/root/compatibilitytools.d/
# download the tarball
wget $tar_url
echo "extracting tarball"
tar -xf $tar_name -C /home/$USER/.steam/root/compatibilitytools.d/
echo "extraction done"
echo "removing tarball"
rm $tar_name
echo "done!"
fi