generate-pgdg-source: Clean other dotfiles as well
authorChristoph Berg <myon@debian.org>
Fri, 10 Jan 2025 12:03:27 +0000 (13:03 +0100)
committerChristoph Berg <myon@debian.org>
Fri, 10 Jan 2025 12:03:27 +0000 (13:03 +0100)
jenkins/generate-pgdg-source

index e334a363ac32d3699fc3068af17fd956c43833ce..0e04215ba0505080d706e56aca418daa5cdadac8 100755 (executable)
@@ -3,7 +3,7 @@
 # The MIT License
 #
 # Copyright (c) 2011,2012 by Michael Prokop <mika@debian.org>
-# Copyright (c) 2012-2024 by Christoph Berg <myon@debian.org>
+# Copyright (c) 2012-2025 by Christoph Berg <myon@debian.org>
 #
 # Permission is hereby granted, free of charge, to any person obtaining a copy
 # of this software and associated documentation files (the "Software"), to deal
@@ -377,7 +377,8 @@ dcmd mv -v ${PACKAGE}_*.changes result
 if [ "${apt_suite:-}" ]; then
   rm -rf source
 elif [ "${GIT_COMMIT:-}" ]; then
-  rm -rf source/* # remove everything except .git
+  # remove everything except .git
+  find source/ -mindepth 1 -maxdepth 1 -not -name .git | xargs -r rm -rf
 fi
 
 # vim:foldmethod=marker ts=2 ft=sh ai expandtab sw=2