[ut2004] Backups? - Note to the wise - ... patches ...

Thomas Otto 3.1415926535897932384626433832 at gmx.net
Mon Jul 5 09:48:34 EDT 2004


Note to the wiser - ALWAYS have backups :)

> Back to reinstall AGAIN...

Here is how I backup the u2k4 files which would be changed *before* 
patching:

Assuming you installed your ut2k4 to /usr/local/games/ and also safed 
and untared your patch to this location (dir permissions are
drwxrwsr-x root:games here with me being in the games group so I dont 
need to be root all the time).

generate a list of files that would be patched:
$ cd /usr/local/games/UT2004-Patch
$ find . -type f > ../ut2k4.patch.3236-1.file.list

then maybe become root and backup the files before applying the patch

$ cd /usr/local/games/
$ while read i
do
[ -f "ut2004/$i" ] && cp -v "ut2004/$i" "ut2004/$i.3236-1.bak"
done < ut2k4.patch.3236-1.file.list

This is spaces-safe ftr :)

Apply the patch:

$ cp -r UT2004-Patch/* ut2004/

and if anything goes wrong undo it (from the /usr/local/games/ dir):

$ while read i
do
[ -f "ut2004/$i.3236-1.bak" ] && cp -v "ut2004/$i.3236-1.bak" 
"ut2004/$i" || rm -v "ut2004/$i"  ## <- one line from '[ -f ..' on
done < ut2k4.patch.3236-1.file.list

Yeh, linux was never more ready for the desktop, right? ;)


        -Thomas



More information about the ut2004 mailing list