Skip to content

Instantly share code, notes, and snippets.

@antzucaro
Created March 1, 2018 13:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save antzucaro/7ab51434627b08a968357ae7c088b378 to your computer and use it in GitHub Desktop.
Save antzucaro/7ab51434627b08a968357ae7c088b378 to your computer and use it in GitHub Desktop.
Remove unnecessary files from a Xonotic "low" build.
user@host:% tree autobuild/
autobuild/
├── data
│ ├── xonotic-rsync-data-low.pk3
│ └── xonotic-rsync-maps-low.pk3
├── key_0.d0pk
└── xonotic-linux64-dedicated
1 directory, 4 files
user@host:$ du -h autobuild/
97M autobuild/data
105M autobuild/
# ---------------------------------
# commands used to reduce pk3 file size:
zip -qd xonotic-rsync-data-low.pk3 'textures/*' 'sound/*' 'gfx/*' '*/*/*.jpg' '*/*.jpg'
unzip -ql xonotic-rsync-data-low.pk3 | grep -Eo '[^ ]*\.(jpg|png|wav|ogg|dem)$' | \
xargs -I@ zip -qd xonotic-rsync-data-low.pk3 @
zip -qd xonotic-rsync-maps-low.pk3 'textures/*' 'sound/*' 'gfx/*' 'env/*' '*/*/*.jpg' '*/*.jpg'
unzip -ql xonotic-rsync-maps-low.pk3 | grep -Eo '[^ ]*\.(jpg|png|wav|ogg)$' | \
xargs -I@ zip -qd xonotic-rsync-maps-low.pk3 @
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment