1
1
mirror of https://github.com/primer/css.git synced 2024-11-30 19:53:11 +03:00
css/docs/test.sh
2018-12-17 15:26:50 -08:00

23 lines
568 B
Bash
Executable File

#!/bin/bash
set -e
cwd=`pwd`
if [[ ! -e before.txt ]]; then
pushd ../../../github/styleguide/src/_primer > /dev/null
find . -name '*.md' | sort -u > $cwd/tmp.txt
popd > /dev/null
pushd ../../../github/styleguide/src/primer > /dev/null
find . -name '*.md' | sort -u >> $cwd/tmp.txt
popd > /dev/null
cat tmp.txt | sort -u > before.txt
rm tmp.txt
fi
pushd pages/css > /dev/null
find . -name '*.md' | sort -u > $cwd/after.txt
popd > /dev/null
diff before.txt after.txt || {
echo "There was a diff, but it's probably not a big deal?"
}