From 4535c5323a5ce28c1c37c5968a69097d2fb85e41 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Sat, 27 Jul 2013 14:46:33 -0400 Subject: [PATCH] Ignore emacs autosave files in source-repositories source-repositories uses find to discover things it should import. If someone happens to use emacs, and happens to have had an autosave file in a directory with a wildly broken version of a source-repositories- file, then dib will attempt to execute the contents of the autosave file and the user will be sad. Adding a filter to the find command for files ending in ~ will prevent pain and suffering. Change-Id: I27c8a4b53d3c9b913ca926db16b4271941f6fb5d --- .../source-repositories/extra-data.d/98-source-repositories | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elements/source-repositories/extra-data.d/98-source-repositories b/elements/source-repositories/extra-data.d/98-source-repositories index a1098b32..40c41792 100755 --- a/elements/source-repositories/extra-data.d/98-source-repositories +++ b/elements/source-repositories/extra-data.d/98-source-repositories @@ -99,6 +99,6 @@ function get_repos_for_element(){ mkdir -p ~/.cache/image-create/repository-sources/ # Get source repositories for the target -for _SOURCEREPO in $(find $TMP_HOOKS_PATH -maxdepth 1 -name "source-repository-*") ; do +for _SOURCEREPO in $(find $TMP_HOOKS_PATH -maxdepth 1 -name "source-repository-*" -not -name '*~'); do get_repos_for_element $_SOURCEREPO done