[proaudio] [2901] Remove empty (files) directories and add the script that was used to do so.

[ Thread Index | Date Index | More lists.tuxfamily.org/proaudio Archives ]


Revision: 2901
Author:   lilrc
Date:     2014-11-29 19:38:53 +0100 (Sat, 29 Nov 2014)
Log Message:
-----------
Remove empty (files)directories and add the script that was used to do so.

Added Paths:
-----------
    trunk/overlays/proaudio/remove-empty-dirs

Removed Paths:
-------------
    trunk/overlays/proaudio/app-emulation/wineasio/files/
    trunk/overlays/proaudio/app-portage/euses/files/
    trunk/overlays/proaudio/dev-libs/libinstpatch/files/
    trunk/overlays/proaudio/media-libs/asio-sdk/files/
    trunk/overlays/proaudio/media-libs/joss/files/
    trunk/overlays/proaudio/media-libs/ld10k1/files/
    trunk/overlays/proaudio/media-libs/libgig/files/
    trunk/overlays/proaudio/media-libs/lv2dynparam1/files/
    trunk/overlays/proaudio/media-libs/vst-sdk/files/
    trunk/overlays/proaudio/media-libs/zynaddsubfx-banks/files/
    trunk/overlays/proaudio/media-libs/zynaddsubfx-collection/files/
    trunk/overlays/proaudio/media-libs/zynaddsubfx-extras/files/
    trunk/overlays/proaudio/media-plugins/amb-plugins/files/
    trunk/overlays/proaudio/media-plugins/azr3-lv2/files/
    trunk/overlays/proaudio/media-plugins/frei0r-plugins/files/
    trunk/overlays/proaudio/media-plugins/gst-buzztard/files/
    trunk/overlays/proaudio/media-plugins/hexter/files/
    trunk/overlays/proaudio/media-plugins/lv2vocoder/files/
    trunk/overlays/proaudio/media-plugins/nekobee/files/
    trunk/overlays/proaudio/media-plugins/wasp/files/
    trunk/overlays/proaudio/media-plugins/whysynth/files/
    trunk/overlays/proaudio/media-plugins/wsynth-dssi/files/
    trunk/overlays/proaudio/media-plugins/xsynth-dssi/files/
    trunk/overlays/proaudio/media-plugins/zynadd/files/
    trunk/overlays/proaudio/media-sound/Annotator/files/
    trunk/overlays/proaudio/media-sound/afsp/files/
    trunk/overlays/proaudio/media-sound/alsaplayer-midi/files/
    trunk/overlays/proaudio/media-sound/azr3-jack/files/
    trunk/overlays/proaudio/media-sound/breakage/files/
    trunk/overlays/proaudio/media-sound/ceres/files/
    trunk/overlays/proaudio/media-sound/esperanza/files/
    trunk/overlays/proaudio/media-sound/fmit/files/
    trunk/overlays/proaudio/media-sound/ggseq/files/
    trunk/overlays/proaudio/media-sound/gnuitar/files/
    trunk/overlays/proaudio/media-sound/gwc/files/
    trunk/overlays/proaudio/media-sound/iannix/files/
    trunk/overlays/proaudio/media-sound/jackEQ/files/
    trunk/overlays/proaudio/media-sound/jackminimix/files/
    trunk/overlays/proaudio/media-sound/jackmix/files/
    trunk/overlays/proaudio/media-sound/jamin/files/
    trunk/overlays/proaudio/media-sound/jokosher/files/
    trunk/overlays/proaudio/media-sound/madjack/files/
    trunk/overlays/proaudio/media-sound/midicontroller/files/
    trunk/overlays/proaudio/media-sound/ninjam-server/files/
    trunk/overlays/proaudio/media-sound/qjackctl/files/
    trunk/overlays/proaudio/media-sound/qloud/files/
    trunk/overlays/proaudio/media-sound/qsampler/files/
    trunk/overlays/proaudio/media-sound/qtractor/files/
    trunk/overlays/proaudio/media-sound/reshaked/files/
    trunk/overlays/proaudio/media-sound/rtsynth/files/
    trunk/overlays/proaudio/media-sound/san-dysth/files/
    trunk/overlays/proaudio/media-sound/simplesysexxer/files/
    trunk/overlays/proaudio/media-sound/snd-ls/files/
    trunk/overlays/proaudio/media-sound/tkeca/files/
    trunk/overlays/proaudio/media-sound/traverso/files/
    trunk/overlays/proaudio/media-sound/xmms2/files/
    trunk/overlays/proaudio/media-sound/xmms2tray/files/
    trunk/overlays/proaudio/media-sound/xwax/files/
    trunk/overlays/proaudio/media-sound/yatm/files/
    trunk/overlays/proaudio/media-sound/zynjacku/files/
    trunk/overlays/proaudio/sys-process/rt-exec/files/
    trunk/overlays/proaudio/sys-process/set_rlimits/files/
    trunk/overlays/proaudio/x11-libs/qwt/files/
    trunk/overlays/proaudio/x11-misc/xanalyser/files/

Added: trunk/overlays/proaudio/remove-empty-dirs
===================================================================
--- trunk/overlays/proaudio/remove-empty-dirs	                        (rev 0)
+++ trunk/overlays/proaudio/remove-empty-dirs	2014-11-29 18:38:53 UTC (rev 2901)
@@ -0,0 +1,44 @@
+#!/bin/bash
+#
+#  Copyright (C) 2014 Karl Lindén
+#
+#  This program is free software; you can redistribute it and/or modify
+#  it under the terms of the GNU General Public License as published by
+#  the Free Software Foundation; either version 2 of the License, or
+#  (at your option) any later version.
+#  
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#  
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software
+#  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+#  MA 02110-1301, USA.
+#  
+
+# Remove empty directories
+
+remove_empty_dirs() {
+	local path=${1}
+	local remove=true
+	local contents=$(ls -A ${path})
+	for c in ${contents}; do
+		if [ "${c}" != .svn ]; then
+			local fullc="${path}/${c}"
+			if [ -d ${fullc} ]; then
+				local removed=$(remove_empty_dirs ${fullc})
+				[[ "${removed}" == true ]] || remove=false
+			else
+				remove=false
+			fi
+		fi
+	done
+
+	[[ "${remove}" = true ]] && svn del ${path}
+
+	echo "${remove}"
+}
+
+remove_empty_dirs . > /dev/null


Property changes on: trunk/overlays/proaudio/remove-empty-dirs
___________________________________________________________________
Added: svn:executable
   + *


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/