summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorXZS2016-04-22 11:40:58 +0200
committerXZS2016-04-22 11:40:58 +0200
commit0ff5642c4c0582878d7f352a4f72d066b9f94175 (patch)
tree38b659df6748ea2af5a16eade791d2fe9f3b8092
parentb82aee2ea12f41afdb07c4393942eded5d8c8c95 (diff)
downloadaur-0ff5642c4c0582878d7f352a4f72d066b9f94175.tar.gz
exclude hidden filed in subdirectories
Despite the wild card * not coping hidden files, this does not exclude such in subdirectories. A reliable method to exclude files by a pattern like "starting with a dot" would be rsync. But to not pull it in as an additional dependency, copy and find are preferred.
-rw-r--r--PKGBUILD4
1 files changed, 2 insertions, 2 deletions
diff --git a/PKGBUILD b/PKGBUILD
index a3915b7327fc..5a443b28d5ce 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -78,8 +78,8 @@ depends=(${pkgname%%-*})
package() {
compose_dependencies
prepare_target
- install -d "$destdir/$id"
- cp --no-preserve=ownership,mode -r * "$destdir/$id"
+ cp --no-preserve=ownership,mode -r . "$destdir/$id"
+ find "$destdir/$id" -mindepth 1 -name ".*" -exec rm -rf '{}' +
}
# Hidden from mksrcinfo in silly subfunction.