aboutsummaryrefslogtreecommitdiff
path: root/trunk/src/createpkg
diff options
context:
space:
mode:
Diffstat (limited to 'trunk/src/createpkg')
-rw-r--r--trunk/src/createpkg61
1 files changed, 13 insertions, 48 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')