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
This commit is contained in:
Monty Taylor 2013-07-27 14:46:33 -04:00
parent 6b74b65449
commit 4535c5323a

View file

@ -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