-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathShaderCacheChecker.sh
More file actions
executable file
·55 lines (41 loc) · 1.16 KB
/
ShaderCacheChecker.sh
File metadata and controls
executable file
·55 lines (41 loc) · 1.16 KB
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
#!/usr/bin/env bash
# Check we have the tools
JQ=$(which jq)
if [ -z "$JQ" ]; then
echo "Cannot find jq .. please install it and try again"
exit 1
fi
GREP=$(which grep)
if [ -z "$GREP" ]; then
echo "Cannot find grep .. please install it and try again"
exit 1
fi
PS=$(which ps)
if [ -z "$PS" ]; then
echo "Cannot find ps .. please install it and try again"
exit 1
fi
CUT=$(which cut)
if [ -z "$CUT" ]; then
echo "Cannot find cut .. please install it and try again"
exit 1
fi
UNIQ=$(which uniq)
if [ -z "$UNIQ" ]; then
echo "Cannot find uniq .. please install it and try again"
exit 1
fi
CURL=$(which curl )
if [ -z "$CURL" ]; then
echo "Cannot find curl .. please install it and try again"
exit 1
fi
# Locate any running shader compilations
STEAMID=$( $PS efax | $GREP -Eo [s]hadercache/[0-9]\* |$CUT -d / -f 2 |$UNIQ)
if [ -z "$STEAMID" ]; then
echo "Nothing currently compiling"
exit 0
fi
# Use that ID to scrape the name of the game
APPNAME=$( $CURL -s -L http://store.steampowered.com/api/appdetails?appids=$STEAMID | $JQ --arg steamkey "$STEAMID" '.["\($steamkey)"].data.name' )
echo "$APPNAME is currently having its Vulcan Shaders compiled"