From 34f4744997c43949a8ad1c2ea5dd5d38bdf6ac9e Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Thu, 1 Feb 2018 04:33:56 +0000 Subject: [PATCH 1/2] scripts/list-non-source-files: Add to repository git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7352 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scripts/list-non-source-files | 54 +++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100755 scripts/list-non-source-files diff --git a/scripts/list-non-source-files b/scripts/list-non-source-files new file mode 100755 index 000000000..7b3a3141c --- /dev/null +++ b/scripts/list-non-source-files @@ -0,0 +1,54 @@ +#!/bin/bash + +export LC_ALL=C + +prefix_matches() { + local f + + f="$1" + shift + for s in "$@"; do + if [ "$f" = "$s" ] || [ "${f#s/}" != "$f" ]; then + return 0 + fi + done + return 1 +} + +for d in "${@-.}"; do +( + cd "$d" && + if [ -e .svn ]; then + svn status --no-ignore | + grep '^[I?] ' | + cut -c8- + elif git branch >&/dev/null; then + exec 3< <(find . -type f | cut -c3- | grep -v '^\.git/' | sort) + git ls-tree -r HEAD | cut -f2 -d' ' | sort | + while read -r f; do + while { read -r g; } <&3 && [ "$g" '<' "$f" ]; do echo "$g"; done + done + while { read -r g; } <&3; do echo "$g"; done + exec 3<&- + elif hg branch >&/dev/null; then + subrepos=$(if [ -e .hgsub ]; then sed 's/ = .*//' .hgsub; fi)"" + exec 3< <(find . -type f | cut -c3- | grep -Ev '^$|^\.hg/' | sort) + hg locate | + sort | + while read -r f; do + while { read -r g; } <&3 && [ "$g" '<' "$f" ]; do + if ! prefix_matches "$g" "$subrepos"; then + echo "$g" + fi + done + done + while { read -r g; } <&3; do echo "$g"; done + exec 3<&- + for s in $subrepos; do + $0 "$s" + done + else + echo "Ignored directory $PWD" + fi +) +done From b3435fbddadf6d279e6b8a7da1f0d8ea411cbb4f Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Thu, 1 Feb 2018 04:45:01 +0000 Subject: [PATCH 2/2] debian/rules: Also clean the scstadmin/scstadmin soft link git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7353 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- debian/rules | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules index 37435d235..e7db5e4ab 100755 --- a/debian/rules +++ b/debian/rules @@ -24,7 +24,8 @@ VERSION:=$(shell head -n1 debian/changelog | sed 's/.*(\([0-9.]*\).*).*/\1/') clean: dh_testdir && \ dh_prep -Xqla_isp/TAGS -Xdebian/changelog && \ - scripts/clean-source-tree -x debian/changelog + scripts/clean-source-tree -x debian/changelog && \ + rm -f scstadmin/scstadmin build: export BUILD_2X_MODULE=y && \