mirror of
https://github.com/pConst/basic_verilog.git
synced 2025-01-14 06:42:54 +08:00
Added updater script
This commit is contained in:
parent
978bed92bc
commit
88db449245
42
scripts/update_from_ref.sh
Normal file
42
scripts/update_from_ref.sh
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
#! /usr/bin/env bash
|
||||||
|
|
||||||
|
# update_from_ref.sh
|
||||||
|
# published as part of https://github.com/pConst/basic_verilog
|
||||||
|
# Konstantin Pavlov, pavlovconst@gmail.com
|
||||||
|
#
|
||||||
|
# Updates all copies of files to the last reference version
|
||||||
|
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
pp=$(pwd)
|
||||||
|
|
||||||
|
|
||||||
|
# $1 - reference file
|
||||||
|
update () {
|
||||||
|
|
||||||
|
find . -type f -name $(basename -- "$1") -print0 | while IFS= read -r -d '' fp; do
|
||||||
|
fpr=$(readlink -f $fp)
|
||||||
|
|
||||||
|
if [ "$fpr" != "$1" ]; then
|
||||||
|
|
||||||
|
echo -n $fpr
|
||||||
|
|
||||||
|
if cmp -s $1 $fpr; then
|
||||||
|
echo " - OK"
|
||||||
|
else
|
||||||
|
echo " - DIFFER"
|
||||||
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
echo $pp
|
||||||
|
echo "========================================================================="
|
||||||
|
update $pp/scripts/clean_vivado.bat
|
||||||
|
|
||||||
|
echo "========================================================================="
|
||||||
|
update $pp/scripts/clean_quartus.bat
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user