Import MOCHA 1.0.00.003

Download source as of 2013-05-03 13:09 from the VA FOIA site:

    https://downloads.va.gov/files/FOIA/Software/Patches_By_Application/MOCHA/mocha_scrubbed_fdb_included.zip

Run shell code to extract the source code of MOCHA:

    sha1=de7b1b1e2eb8fdedac6566b0867083580f0146d8 &&
    sha1sum Mocha_Scrubbed_fdb_included.zip | gnugrep -q $sha1 &&
    unzip Mocha_Scrubbed_fdb_included.zip &&
    mv Mocha_Scrubbed/sgn_PHARMO_SWRI_Code_Drop_scrubbed.zip . &&
    rm -rf Mocha_Scrubbed Mocha_Scrubbed_fdb_included.zip &&
    sha1=c1ff51dde0416e07a582afdb3ec4cc232e47491f &&
    sha1sum sgn_PHARMO_SWRI_Code_Drop_scrubbed.zip | gnugrep -q $sha1 &&
    unzip sgn_PHARMO_SWRI_Code_Drop_scrubbed.zip &&
    mv "sgn_PHARMO_SWRI_Code_Drop/vobs/PHARM0_SwRI_code_drop/MOCHA version 1.0.00.003/MOCHA_v1.0.00.003-sourcecode.zip" . &&
    rm -rf sgn_PHARMO_SWRI_Code_Drop_scrubbed.zip sgn_PHARMO_SWRI_Code_Drop &&
    sha1=80d150e8be55367ba34360845e4bc36d7f40d94d &&
    sha1sum MOCHA_v1.0.00.003-sourcecode.zip | gnugrep -q $sha1 &&
    unzip MOCHA_v1.0.00.003-sourcecode.zip &&
    (cd MOCHA_v1.0.00.003-sourcecode/PepsLite; tar c *) | tar x &&
    rm -rf MOCHA_v1.0.00.003-sourcecode.zip MOCHA_v1.0.00.003-sourcecode

Also fix permissions and line endings:

    find * -type f -print0 | xargs -0 chmod u+w &&
    find * -type f -print0 | egrep -vzZ '\.(doc|gif|ico|jpg|pdf|png|wav|xls|jar|zip|ZIP)' | xargs -0 -n 1 dos2unix