check_include_diff.sh 398 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
#!/usr/bin/env

include1=$1
include2=$2

root=$(pwd)

cd $include1
list1=$(find . -name "*" | sort -n | uniq)
cd $root
echo "$list1" > include1.list

cd $include2
list2=$(find . -name "*" | sort -n | uniq)
cd $root
echo "$list2" > include2.list

diff include1.list include2.list

if [ "$?" = "0" ]
then
    echo "no diff"
else
    echo "has diff"
fi

rm include1.list
rm include2.list

echo "done"