Skip to content

Instantly share code, notes, and snippets.

@rickychien
Created March 9, 2015 07:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rickychien/da640f608a05fc7d0de8 to your computer and use it in GitHub Desktop.
Save rickychien/da640f608a05fc7d0de8 to your computer and use it in GitHub Desktop.
Put this scripts our of gaia folder and run ./node-build-diff.sh
#!/bin/bash
REV1=xpc
REV2=node
compute_profile () {
REV=$1
FLAG=""
if [ $REV == "node" ]; then
FLAG="$FLAG RUN_ON_NODE=1"
fi
if [ ! -d diffs/profiles/$REV ]; then
make clean
make $FLAG
mv profile diffs/profiles/$REV
fi
}
unzip_profile () {
REV=$1
if [ ! -d diffs/unzip/$REV ]; then
mkdir -p diffs/unzip/$REV
cp -r diffs/profiles/$REV/* diffs/unzip/$REV/
ZIPS=$(find diffs/unzip/$REV/ -name *.zip)
for ZIP in $ZIPS; do
unzip -q -d $(echo $ZIP | sed 's/\.zip$/\.unzip/') $ZIP
rm $ZIP
done;
fi
}
cd gaia
mkdir -p diffs/profiles
compute_profile $REV1
compute_profile $REV2
mkdir -p diffs/unzip
unzip_profile $REV1
unzip_profile $REV2
cd diffs/unzip && diff --brief -r $REV1 $REV2
echo ""
echo "For more details, run:"
echo " diff -r gaia/diffs/unzip/$REV1 gaia/diffs/unzip/$REV2"
echo " or same with meld, kdiff3,..."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment