Update script to identify new/removed files
This commit is contained in:
parent
c645e122bb
commit
cc0447cea6
1 changed files with 12 additions and 13 deletions
25
debian/upstream-file-count-check.sh
vendored
25
debian/upstream-file-count-check.sh
vendored
|
@ -1,14 +1,13 @@
|
|||
# set -x # use this for debugging
|
||||
|
||||
ucount=$(ls -1a |grep -vx .git | wc -l)
|
||||
dcount=$(cat debian/gitlab.install |cut -d' ' -f1|grep -v debian |wc -l)
|
||||
ignored=32
|
||||
if ! [ $(echo "$ucount" - "$dcount"|bc) -eq $ignored ]; then
|
||||
echo "Found new files added by upstream and not added to debian/install"
|
||||
echo "Add them to debian/gitlab.install or adjust 'ignored=${ignored}'"
|
||||
echo "in debian/upstream-file-count-check.sh as required and update"
|
||||
echo "debian/upstream-file-list"
|
||||
ls -1a |grep -vx .git > debian/upstream-file-list.new
|
||||
diff -u debian/upstream-file-list debian/upstream-file-list.new
|
||||
echo "Upstream added or removed files"
|
||||
echo "Update 'debian/gitlab.install' and/or 'debian/ignored-file-list'"
|
||||
ls -1a |grep -vx .git |grep -vx .pc > debian/upstream-file-list.new
|
||||
echo "\nNewly added files are:"
|
||||
echo "---------------------"
|
||||
comm -23 debian/upstream-file-list.new debian/upstream-file-list
|
||||
echo "---------------------\n"
|
||||
echo "Removed files are:"
|
||||
echo "---------------------"
|
||||
comm -13 debian/upstream-file-list.new debian/upstream-file-list
|
||||
echo "---------------------"
|
||||
echo "\nAfter updating, rename 'debian/upstream-file-list.new' as 'debian/upstream-file-list'\n"
|
||||
exit 1
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue