[ut2004] Cache installer

Thomas Otto 3.1415926535897932384626433832 at gmx.net
Mon Jun 6 14:49:13 EDT 2005

> If you don't know, UT and UT2004 use the same cache layout.

No, I never played UT :)

> Just change .loki/ut/Cache to .ut2004/Cache and of course it works.

Maybe put the dir into one variable so one only has to change it in one

And both our scripts could be exploited by the $( ) or `` shell escapes
(which are valid filenamecharacters at least on on Linux) since I pipe
into sh and you directly execute the file via sh[1]:

A41F8DC011D87B483000048CB7637684-1=Test`touch /tmp/Boom1`MapOne.ut2
B41F8DC011D87B483000048CB7637684-1=Test$(touch /tmp/Boom2)MapTwo.ut2

as a cache.ini entry - to fix it (as I did in my script) escape these chars:

( cat cache.ini | grep -v Cache |  ....
( grep -v Cache cache.ini | sed 's,\(`\|\$\),\\\1,g' | ....

And back to arguing which script is "better" :)

My script already places the files in their appropriate folders and
leaves modfiles (.u) in place (since mods are better not installed this
way), without a cache.ini entry the files in the cache dir are invisible
to ut2004.


[1]: Admitedly I only found it looking for bugs in your script and then
finding the same in mine :)

More information about the ut2004 mailing list