Created
January 20, 2018 06:46
-
-
Save xDShot/7686f1c41243fcd3da78e8d73de07a5e to your computer and use it in GitHub Desktop.
Re-convert vtf textures into older format to support older Source Engine versions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
for D in ./*; do | |
if [ -d "$D" ]; then | |
echo "I go into $D folder" | |
cd "$D" | |
for i in *; do | |
if [ ${i: -4} == ".vmt" ] | |
then | |
echo "Remove $i text file" | |
rm $i | |
fi | |
if [ ${i: -4} == ".vtf" ] | |
then | |
echo "Generating tga from $i" | |
vtf2tga $i >/dev/null | |
echo "Get basename from $i" | |
export _basei=$(basename $i .vtf) | |
echo "It's $_basei" | |
#rm $i | |
vtex_hl2 ${_basei}.tga | |
fi | |
done | |
cd .. | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment