diff options
author | Fabian Groffen <grobian@gentoo.org> | 2018-03-29 07:54:58 +0200 |
---|---|---|
committer | Fabian Groffen <grobian@gentoo.org> | 2018-03-29 07:54:58 +0200 |
commit | 21d5c5b399b2645f33ff25faaeb1219e3c5c9b52 (patch) | |
tree | b5c0f60321072c313fc74034452ff0c05eca93a7 | |
parent | scripts/rsync-generation/update-rsync-master: touch cat metadata.xml upon pac... (diff) | |
download | prefix-21d5c5b399b2645f33ff25faaeb1219e3c5c9b52.tar.gz prefix-21d5c5b399b2645f33ff25faaeb1219e3c5c9b52.tar.bz2 prefix-21d5c5b399b2645f33ff25faaeb1219e3c5c9b52.zip |
scripts/rsync-generation/update-rsync-master: deal with nested files (filesdir) in apply_git_mtimes
-rwxr-xr-x | scripts/rsync-generation/update-rsync-master.sh | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/scripts/rsync-generation/update-rsync-master.sh b/scripts/rsync-generation/update-rsync-master.sh index 4eac483b88..859eb9df55 100755 --- a/scripts/rsync-generation/update-rsync-master.sh +++ b/scripts/rsync-generation/update-rsync-master.sh @@ -83,9 +83,14 @@ apply_git_mtimes() { # in case a file is removed, ensure Manifest gets # updated by touching a file which should be there if [[ $2 == */*/* ]] ; then - [[ -f ${2%/*}/metadata.xml ]] \ - && files+=( ${2%/*}/metadata.xml ) \ - || files+=( ${2%/*/*}/metadata.xml ) + local f=${2} + # treat anything in files at the package level + [[ ${f} == */files/* ]] && f=${f%/files/*}/foo + # if the entire package was removed, touch the + # category level metadata + [[ -f ${f%/*}/metadata.xml ]] \ + && files+=( ${f%/*}/metadata.xml ) \ + || files+=( ${f%/*/*}/metadata.xml ) fi ;; esac |