Build-Checksum
From MapbenderWiki
Contents |
Checksum Build Script
Workgroup
- Developer: User:Siddharth Prakash Singh
- Mentor: User: Christoph Baudson
Status
This is a part of Google Summer of Code 2008. The checksum build script is ready to use. Three files are part of this script : build-checksum.php, checksum-utils.inc, commandLine.inc
This script is available here
Idea
The update script requires to check whether the Mapbender version installed on the user's machine has been customized. To implement this, checksum of every file is stored in a file checksum.json in its directory. These checksums are later matched against their current counterpart to verify whether the file has been modified.
Hence it is required to distribute a mapbender version with the checksum of each file stored in JSON format. This is automatically handled by this script.
Requirements
- PHP (CLI)
Instructions
- Open the file build-checksum.php to edit it. Define the constant ROOTDIR as the path to the mapbender directory which is to be built.
- Edit the contents of the array $dir_not_to_scan. Add those directories in this array whose checksum is not to be verified later. Example: conf, log etc. You need to edit this line in the file build-checksum.php :
array_push($dir_not_to_scan,".", "..", "conf", "license", "log", "resources", "update");
- Execute the script build-checksum.php from the command line :
$ php build-checksum.php
- If there is no warning, the build script succesfully created the desired checksum.json files.
