- common.sh:
- other minor changes
- repository metainformationg is now added at svn control if applicable
- - new functions su_svn, chown_svn, chgrp_svn, regexp_slash, default_distro and svn_add
+ - new functions svn_remove_empty_folders, svn_del, su_svn, chown_svn, chgrp_svn,
+ regexp_slash, default_distro and svn_add
- new config parameter "TMP"
- renamed function use_svn to templates_under_svn
- simplaret: simplaret_search_and_process_patch do not donwload a package with the same
chown_svn $file && chgrp_svn $file
( cd $folder && su_svn del --force `basename $file` )
else
- rm -f $file
+ rm -rf $file
fi
}
}
+function svn_remove_empty_folders {
+
+ if [ -z "$1" ]; then
+ return 1
+ fi
+
+ main_folder="$1"
+ search="`find $main_folder -type d | grep -v '/.svn' | sed '1d'`"
+ results="`echo $search | wc -l`"
+
+ if [ "$results" -eq "0" ]; then
+ svn_del $folder
+ else
+ for folder in $search; do
+ svn_remove_empty_folders $folder
+ done
+ fi
+
+}
+
# -----------------------------------------------
# update jail functions
# -----------------------------------------------