Repository navigation
Expand file tree
/
Copy pathupdate.sh
More file actions
executable file
·86 lines (65 loc) · 1.89 KB
/
Copy pathupdate.sh
File metadata and controls
executable file
·86 lines (65 loc) · 1.89 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#!/bin/bash
set -euo pipefail
cd "${0%/*}"
. ../common.sh
echo "Processing CS2..."
DUMPER_EXIT_CODE=0
ProcessVPK
echo "::group::Extracting VPKs"
set +e
while IFS= read -r -d '' file
do
echo " $file"
# When updating vpk_extensions, also update "pak01_dir.vpk:..." in files.json, since only those entries are downloaded
"$VRF_PATH" \
--input "$file" \
--output "$(echo "$file" | sed -e 's/\.vpk$/\//g')" \
--vpk_cache \
--vpk_decompile \
--vpk_extensions "txt,lua,kv3,db,gameevents,vcss_c,vjs_c,vts_c,vxml_c,vsndevts_c,vsndstck_c,vpulse_c,vdata_c"
VRF_EXIT_CODE=$?
if [[ "$DUMPER_EXIT_CODE" -eq 0 ]] && [[ "$VRF_EXIT_CODE" -ne 0 ]]; then
DUMPER_EXIT_CODE=$VRF_EXIT_CODE
fi
done < <(find . -type f -name "pak01_dir.vpk" -print0)
while IFS= read -r -d '' file
do
echo " $file"
"$VRF_PATH" \
--input "$file" \
--output "$(echo "$file" | sed -e 's/\.vpk$/\//g')" \
--vpk_cache \
--vpk_decompile \
--vpk_extensions "vcs"
VRF_EXIT_CODE=$?
if [[ "$DUMPER_EXIT_CODE" -eq 0 ]] && [[ "$VRF_EXIT_CODE" -ne 0 ]]; then
DUMPER_EXIT_CODE=$VRF_EXIT_CODE
fi
done < <(find . -type f -name "shaders_vulkan_dir.vpk" -print0)
while IFS= read -r -d '' file
do
newfile=$(echo "$file" | sed -e 's/_vulkan_[0-9]\+\.vfx$/.slang/g')
if [[ "$file" != "$newfile" ]]; then
mv "$file" "$newfile"
fi
done < <(find . -type f -name "*_vulkan_*.vfx" -print0)
set -e
echo "::endgroup::"
set +e
../tools/dump_source2.sh CS2
DUMP_SOURCE2_EXIT_CODE=$?
set -e
if [[ "$DUMPER_EXIT_CODE" -eq 0 ]]; then
DUMPER_EXIT_CODE=$DUMP_SOURCE2_EXIT_CODE
fi
ProcessDepot ".dll" ".exe"
DeduplicateStrings
while IFS= read -r -d '' file
do
sed -i '/\/\/# sourceMappingURL=/d' "$file"
done < <(find . -type f -name "*.js" -print0)
ProcessToolAssetInfo
FixUCS2
CreateCommit "$(grep "ClientVersion=" game/csgo/steam.inf | grep -o '[0-9\.]*')" "$(grep -o '[0-9\.]*' steam_buildid.txt)"
echo "Done"
exit "$DUMPER_EXIT_CODE"