diff options
Diffstat (limited to 'debian/dh_rmemptydirs')
-rwxr-xr-x | debian/dh_rmemptydirs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/debian/dh_rmemptydirs b/debian/dh_rmemptydirs new file mode 100755 index 0000000..4a010c7 --- /dev/null +++ b/debian/dh_rmemptydirs @@ -0,0 +1,10 @@ +#! /bin/sh -e + +pkg=`echo $1 | sed 's/^-p//'` + +: # remove empty directories, when all components are in place +for d in `find debian/$pkg -depth -type d -empty 2> /dev/null`; do \ + while rmdir $d 2> /dev/null; do d=`dirname $d`; done; \ +done + +exit 0 |