mirror of
https://github.com/ben-grande/qusal.git
synced 2025-01-05 21:00:54 -05:00
fix: skip projects with untracked states
This commit is contained in:
parent
648bccd2d3
commit
d5b4190d3e
@ -21,7 +21,6 @@ host:
|
|||||||
- rpm_spec/qusal-fedora-minimal.spec
|
- rpm_spec/qusal-fedora-minimal.spec
|
||||||
- rpm_spec/qusal-fedora-xfce.spec
|
- rpm_spec/qusal-fedora-xfce.spec
|
||||||
- rpm_spec/qusal-fetcher.spec
|
- rpm_spec/qusal-fetcher.spec
|
||||||
- rpm_spec/qusal-grafana.spec
|
|
||||||
- rpm_spec/qusal-kicksecure-minimal.spec
|
- rpm_spec/qusal-kicksecure-minimal.spec
|
||||||
- rpm_spec/qusal-mail.spec
|
- rpm_spec/qusal-mail.spec
|
||||||
- rpm_spec/qusal-media.spec
|
- rpm_spec/qusal-media.spec
|
||||||
|
@ -25,7 +25,8 @@ fi
|
|||||||
ignored="$(git ls-files --exclude-standard --others --ignored salt/)"
|
ignored="$(git ls-files --exclude-standard --others --ignored salt/)"
|
||||||
untracked="$(git ls-files --exclude-standard --others salt/)"
|
untracked="$(git ls-files --exclude-standard --others salt/)"
|
||||||
unwanted="$(printf '%s\n%s\n' "${ignored}" "${untracked}" |
|
unwanted="$(printf '%s\n%s\n' "${ignored}" "${untracked}" |
|
||||||
grep -e "^salt/\S\+/README.md" | cut -d "/" -f2 | sort -u)"
|
grep -E "^salt/\S+/(README.md|.*\.sls|files/.*)$" | cut -d "/" -f2 |
|
||||||
|
sort -u)"
|
||||||
group="$(./scripts/spec-get.sh dom0 group)"
|
group="$(./scripts/spec-get.sh dom0 group)"
|
||||||
projects="$(find salt/ -mindepth 1 -maxdepth 1 -type d | sort -d |
|
projects="$(find salt/ -mindepth 1 -maxdepth 1 -type d | sort -d |
|
||||||
sed -e "s|^salt/\(\S\+\)| - rpm_spec/${group}-\1.spec|")"
|
sed -e "s|^salt/\(\S\+\)| - rpm_spec/${group}-\1.spec|")"
|
||||||
@ -42,11 +43,14 @@ fi
|
|||||||
sed -e "/@SPEC@/d" -- "${template}" | tee -- "${target}" >/dev/null
|
sed -e "/@SPEC@/d" -- "${template}" | tee -- "${target}" >/dev/null
|
||||||
printf '%s\n' "${projects}" | tee -a -- "${target}" >/dev/null
|
printf '%s\n' "${projects}" | tee -a -- "${target}" >/dev/null
|
||||||
if test "${1-}" = "test"; then
|
if test "${1-}" = "test"; then
|
||||||
if ! cmp -s -- "${target}" "${intended_target}"; then
|
if diff --help | grep " --color\[" >/dev/null 2>&1; then
|
||||||
|
diff_args="--color=auto"
|
||||||
|
fi
|
||||||
|
# shellcheck disable=SC2086
|
||||||
|
if ! diff ${diff_args} -- "${intended_target}" "${target}"; then
|
||||||
|
echo "${0##*/}: $ diff ${diff_args} -- '${intended_target}' '${target}'"
|
||||||
err_msg="${0##*/}: error: File ${intended_target} is not up to date"
|
err_msg="${0##*/}: error: File ${intended_target} is not up to date"
|
||||||
printf '%s\n' "${err_msg}" >&2
|
printf '%s\n' "${err_msg}" >&2
|
||||||
err_msg="${0##*/}: error: Update the builder file with: ${0##/*}"
|
|
||||||
printf '%s\n' "${err_msg}" >&2
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user