Linux/editarchive
From GameCPWiki
This guide will provide the basics of how to edit and create Linux based Game- archives.
Contents |
Using tar
All default archives built for GameCP utilize tar and are called with the same lines each time.
Creating an archive
tar -pczf <archive>.tar.gz <files>
Replace <archive> with the name you want the .tar.gz to be Replace <files> with individual files (separated by spaces) or an asterisk (*) to tar all files in the current working directory (pwd).
Hidden Directorys in archives: If you want to add a hidden directory (like .mohaa) you must tell tar where it is, tar will not grab them with *, in this case you replace <files> with '.mohaa *' or all individual files.
Extracting an archive
tar zxvf <archive>.tar.gz
Replace <archive> with the name of the archive your extracting. You can add the optional -C flag to the end of the line then define a directory you want to extract the archive in, otherwise the archive is extracted to the current working directory (pwd).
Make it work with GameCP
Editing the archives is simple, Game-hlds_l.tar.gz will be used for an example:
mkdir /tmp/tmp ; cd /tmp/tmp tar zxvf /usr/local/gcp/installs/Game-hlds_.tar.gz
This extracts the archive in /tmp/tmp, since you are in that directory doing an `ls` should show srcds_l, navigate to srcds_l (cd srcds_l) and modify the contents.
Once your done making changes re-package the archive:
cd /tmp/tmp tar -pczf /usr/local/gcp/installs/Game-hlds_.tar.gz * rm -rf /tmp/tmp/
You have now re-packaged the default archive.
This archive will need to be copied to each machine you manage this game on, please review the Knowledgebase for information on how to easily copy these files over.
Supported Linux Based Archives
GameCP offers archive support on Linux for the following types:
- zip
- tar
- tar.gz
- tar.bz2
- directory

