diff --git a/git_pull/CHANGELOG.md b/git_pull/CHANGELOG.md index 38dccc0..0eaa37b 100644 --- a/git_pull/CHANGELOG.md +++ b/git_pull/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## 7.2 +- Fix restart_ignore when specifying a sub-directory + ## 7.1 - Enhance restart_ignore to support whole directories - Fix repeat option: don't terminate if internet connection unavailable during a check diff --git a/git_pull/config.json b/git_pull/config.json index 63f509f..89d19a2 100644 --- a/git_pull/config.json +++ b/git_pull/config.json @@ -1,6 +1,6 @@ { "name": "Git pull", - "version": "7.1", + "version": "7.2", "slug": "git_pull", "description": "Simple git pull to update the local configuration", "url": "https://home-assistant.io/addons/git_pull/", diff --git a/git_pull/run.sh b/git_pull/run.sh index 1068478..96a45dd 100755 --- a/git_pull/run.sh +++ b/git_pull/run.sh @@ -185,14 +185,14 @@ function validate-config { for changed_file in $CHANGED_FILES; do restart_required_file="" for restart_ignored_file in $RESTART_IGNORED_FILES; do - if [ -z "${restart_ignored_file#*/}" ]; then + if [ -d "$restart_ignored_file" ]; then # file to be ignored is a whole dir restart_required_file=$(echo "${changed_file}" | grep "^${restart_ignored_file}") else restart_required_file=$(echo "${changed_file}" | grep "^${restart_ignored_file}$") fi # break on first match - if [ -n "$restart_required_file" ]; then break ; fi + if [ -n "$restart_required_file" ]; then break; fi done if [ -z "$restart_required_file" ]; then DO_RESTART="true"