diff options
Diffstat (limited to 'trunk/src')
-rw-r--r-- | trunk/src/createpkg | 61 | ||||
-rwxr-xr-x | trunk/src/mkbuild | 39 | ||||
-rwxr-xr-x | trunk/src/templatepkg | 2 |
3 files changed, 19 insertions, 83 deletions
diff --git a/trunk/src/createpkg b/trunk/src/createpkg index c2d3c32..a02c8c8 100644 --- a/trunk/src/createpkg +++ b/trunk/src/createpkg @@ -211,43 +211,12 @@ function info_builds { } -function list_builds { +function list_slackbuilds { - # List all available SlackBuilds - cd $SLACKBUILDS_DIR - echo "Sarava SlackBuilds list" - # level 1 - for i in *; do - if [ -d $i ]; then - echo -e " $i: " - ( - cd $i - # level 2 - for j in *; do - if [ -d $j ]; then - eecho $commun " $j" - ( - cd $j - BUILD="`ls *.SlackBuild 2>/dev/null`" - if [ "$BUILD" != "" ]; then - # level 3 - for k in $BUILD; do - eecho $messag " $k" - done - else - BUILD="" - fi - for k in *; do - if [ -d $k ]; then - eecho $messag " $k.SlackBuild" - fi - done - ) - fi - done - ) - fi - done + # list all available slackbuilds + # usage: list_slackbuilds + + list_builds $SLACKBUILDS_DIR SlackBuild } @@ -379,7 +348,6 @@ function repository_import { repository="file://$repository" fi - repository_type="`echo $repository | cut -d : -f 1`" repository_path="`echo $repository | cut -d : -f 2`" # eval again so it doesn't include repository style information @@ -392,17 +360,14 @@ function repository_import { return $EXIT_CODE fi - if [ "$repository_type" == "file" ] && [ ! -d "$repository_path" ]; then - echo "Creating subversion repository $repository..." - mkdir -p `dirname $repository_path` - svnadmin create $repository_path --fs-type fsfs - chown_svn $repository_path && chgrp_svn $repository_path - if [ "$?" != "0" ]; then - EXIT_CODE="1" - return $EXIT_CODE - fi + check_and_create_svn_repo $repository + if [ "$?" != "0" ]; then + EXIT_CODE="1" + return $EXIT_CODE fi + chown_svn $repository_path && chgrp_svn $repository_path + echo "Importing packages from $packages_dir into $repository..." su_svn import $packages_dir $repository -m "importing binary packages" if [ "$?" == "0" ]; then @@ -612,7 +577,7 @@ case $1 in ;; '--search'|'-s') if [ $# -ne 2 ]; then - list_builds + list_slackbuilds else LIST=`find_slackbuild $2` for i in $LIST; do @@ -651,7 +616,7 @@ case $1 in exit $EXIT_CODE ;; '--list'|'-l') - list_builds + list_slackbuilds exit $EXIT_CODE ;; '--update') diff --git a/trunk/src/mkbuild b/trunk/src/mkbuild index 63ab779..c348038 100755 --- a/trunk/src/mkbuild +++ b/trunk/src/mkbuild @@ -1372,41 +1372,10 @@ function search_mkbuild { function list_mkbuilds { - # List all available mkbuilds - cd $MKBUILDS_DIR - echo "Sarava mkbuilds list" - # level 1 - for i in *; do - if [ -d $i ]; then - echo -e " $i: " - ( - cd $i - # level 2 - for j in *; do - if [ -d $j ]; then - eecho $commun " $j" - ( - cd $j - BUILD="`ls *.mkbuild 2>/dev/null`" - if [ "$BUILD" != "" ]; then - # level 3 - for k in $BUILD; do - eecho $messag " $k" - done - else - BUILD="" - fi - for k in *; do - if [ -d $k ]; then - eecho $messag " $k.mkbuild" - fi - done - ) - fi - done - ) - fi - done + # list all available mkbuilds + # usage: list_mkbuilds + + list_builds $MKBUILDS_DIR mkbuild } diff --git a/trunk/src/templatepkg b/trunk/src/templatepkg index 8d98950..0eee075 100755 --- a/trunk/src/templatepkg +++ b/trunk/src/templatepkg @@ -153,6 +153,7 @@ function import_export_templates { # usage: template_export <import|export> <repository> local templates templates_folder basedir repository mode preposition + local repository_type repository_path if [ "$?" != 0 ]; then usage @@ -179,6 +180,7 @@ function import_export_templates { if [ "$mode" == "export" ]; then preposition="to" + check_and_create_svn_repo $repository echo Exporting templates to $repository... svn import $templates/ $repository/ -m "initial import" if [ "$?" != "0" ]; then |