Last active
March 13, 2025 21:57
-
-
Save adamzwakk/2a4d14d707a7c407a7af3b1075f3ce1d to your computer and use it in GitHub Desktop.
Moves any UT2004 files to www folder for redirect hosting (tries to skip vanilla files)
This file contains hidden or 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
| compress_ut_file() { | |
| f=$(basename $1) | |
| if [ ! -d "$file" -a ! -f "/var/www/ut2004/${f}.uz2" ] && [ "$file" != "*" ]; then | |
| ./ucc-bin compress -nohomedir $1 | |
| mv "${1}.uz2" /var/www/ut2004/ | |
| fi | |
| } | |
| export -f compress_ut_file | |
| cd ~/ut-server/System | |
| find ~/ut-server/Maps/ ~/ut-server/Textures/ ~/ut-server/Animations/ ~/ut-server/Sounds/ ~/ut-server/StaticMeshes/ ~/ut-server/System/ -type f \( -name "*.ut2" -o -name "*.u" -o -name "*.ukx" -o -name "*.uax" -o -name "*.usx" -o -name "*.int" -o -name "*.utx" \) -mtime -365 -exec bash -c 'compress_ut_file "$@"' bash "{}" \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment