diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /linux/make_check/check_differences | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'linux/make_check/check_differences')
| -rw-r--r-- | linux/make_check/check_differences | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/linux/make_check/check_differences b/linux/make_check/check_differences new file mode 100644 index 0000000..6ea5863 --- /dev/null +++ b/linux/make_check/check_differences @@ -0,0 +1,34 @@ +#!/bin/bash + +############################################################## +# +# Check to see if two MSVC dsp files differ and if they +# do then print out the changes +# +############################################################## + +cd make_check +mkdir cache > /dev/null + +IN_DSP=../$1 +OUT_DSP=cache/`basename $1`.check + +p4 edit $OUT_DSP + +if [ ! -f "$OUT_DSP" ]; then + cp $IN_DSP $OUT_DSP + chmod +w $OUT_DSP +fi + +IN_SUM=`md5sum $IN_DSP | cut -f1 -d" "` +OUT_SUM=`md5sum $OUT_DSP| cut -f1 -d" "` + +if test "$IN_SUM" != "$OUT_SUM" ; then + diff $IN_DSP $OUT_DSP > $OUT_DSP.diff.`date +%H:%M:%S-%d%m%y` + less $OUT_DSP.diff.`date +%H:%M:%S-%d%m%y` +fi + +cp $IN_DSP $OUT_DSP +#chmod +w $OUT_DSP +p4 revert -a $OUT_DSP +cd .. |