This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch bugfix/osx in repository x2goclient. from af6322e deduplicate.sh: add new, more or less Proof of Concept, and Work in Progress file deduplication script. new 75b2ecf deduplicate.sh: add duplicates-to-real mapping. The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: debian/changelog | 1 + deduplicate.sh | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 75b2ecff27078f27040fe2aee9ec87a0c67b81da Author: Mihai Moldovan <ionic@ionic.de> Date: Wed Aug 26 21:40:13 2015 +0200 deduplicate.sh: add duplicates-to-real mapping. --- debian/changelog | 1 + deduplicate.sh | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/debian/changelog b/debian/changelog index 35ace0d..7fefeb4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -101,6 +101,7 @@ x2goclient (4.0.5.1-0x2go1) UNRELEASED; urgency=low library path. Putting everything into a single place is a stupid idea. - deduplicate.sh: add new, more or less Proof of Concept, and Work in Progress file deduplication script. + - deduplicate.sh: add duplicates-to-real mapping. [ Oleksandr Shneyder ] * New upstream release (4.0.5.1): diff --git a/deduplicate.sh b/deduplicate.sh index 7c4de14..19dc584 100755 --- a/deduplicate.sh +++ b/deduplicate.sh @@ -77,3 +77,31 @@ echo "New value for all_files:" for entry in ${all_files[@]}; do echo "${entry}" done + +echo "Duplicates-to-real map:" +# Build complementary array to duplicates. +typeset -a to_files +for entry in ${duplicates[@]}; do + typeset filename="$(basename "${entry}")" + + for all_entry in ${all_files[@]}; do + typeset all_entry_filename="$(basename "${all_entry}")" + + if [ -n "${filename}" ] && [ -n "${all_entry_filename}" ]; then + if [ "${filename}" = "${all_entry_filename}" ]; then + to_files+=( "${all_entry}" ) + + echo "${entry} => ${all_entry}" + + # There should be only one entry matching, so we can save a bit of time and break out of the loop. + # Even more importantly, we only want one entry for each duplicates entry anyway... + break + fi + else + echo "WARNING: empty file name while matching duplicates with non-duplicates." >&2 + echo "WARNING: duplicate entry: \"${entry}\"" >&2 + echo "WARNING: real entry: \"${all_entry}\"" >&2 + exit 1 + fi + done +done -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git