Code

Removed empty directories
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 1 Dec 2008 13:18:03 +0000 (13:18 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 1 Dec 2008 13:18:03 +0000 (13:18 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13098 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/contrib/make-gosa-package
gosa-core/dh-make-gosa

index 57dffb8507cce951a9b35e2844361cd3546b7858..10ae3736b064f520acbe75a2a4169e59af31d43f 100755 (executable)
@@ -23,7 +23,7 @@ RELEASE_REASON="GOsa svn snapshot"
 BRANCH="trunk"
 SECTION="web"
 SI_SECTION="utils"
-TARGET_RELEASE="etch"
+TARGET_RELEASE="lenny"
 MAKE_PLUGINS=""
 NOT_RELEASED="heimdal dak dfs glpi opsi apache2 ssh"
 
index 2c6fceb39e0d2cf31d97cf7966cf081ee89ccbb3..5dddf8e44331a24f241addd929155573e1a43fa8 100755 (executable)
@@ -24,6 +24,25 @@ usage() {
 }
 
 
+remove_empty_docs() {
+       for dir in $(find help); do
+               len=$(echo $dir | wc -c)
+               echo $len $dir
+       done | sort -rn | while read dummy dir; do
+
+               if [ -d $dir ]; then
+                       cnt=$(ls -1A $dir | wc -l)
+                       if [ $cnt -eq 0 ]; then
+                               echo "Removing empty $dir"
+                               rm -rf "$dir"
+                               sed -i "/$(echo -n $dir | sed 's/\//\\\//g')/d" debian/install
+                       fi
+               fi
+
+       done
+}
+
+
 load_dsc() {
   if [ -r "$1" ]; then
     PL_NAME=$(sed -n 's/"//g;s/^name\s*=\s*\(.*\)$/\1/p' "$1")
@@ -368,5 +387,8 @@ done
 # Remove examples
 rm debian/*ex debian/*EX >/dev/null 2>&1
 
+# Remove empty docs
+remove_empty_docs
+
 echo "Done."