diff options
Diffstat (limited to 'trunk/src')
-rw-r--r-- | trunk/src/createpkg | 20 | ||||
-rwxr-xr-x | trunk/src/jail-commit | 2 | ||||
-rwxr-xr-x | trunk/src/mkbuild | 8 | ||||
-rwxr-xr-x | trunk/src/templatepkg | 38 |
4 files changed, 34 insertions, 34 deletions
diff --git a/trunk/src/createpkg b/trunk/src/createpkg index 08280a4..9563055 100644 --- a/trunk/src/createpkg +++ b/trunk/src/createpkg @@ -305,7 +305,7 @@ function repository_checkout { function repository_update { - if [ ! -z "$1" ] && [ -d "$1/.svn" ]; then + if [ ! -z "$1" ] && svn_folder $1; then echo "Fetching changes from svn repository for $1..." cwd="`pwd`" chown_svn $1 && chgrp_svn $1 @@ -319,14 +319,14 @@ function repository_status { local cwd - if [ -d "$PACKAGES_DIR/.svn" ]; then + if svn_folder $PACKAGES_DIR; then echo "Status of $PACKAGES_DIR." cwd="`pwd`" cd $PACKAGES_DIR && su_svn status cd $cwd fi - if [ -d "$NOARCH_DIR/.svn" ]; then + if svn_folder $NOARCH_DIR; then cwd="`pwd`" echo "Status of $NOARCH_DIR." cd $NOARCH_DIR && su_svn status @@ -365,7 +365,7 @@ function create_repo_folder { if [ ! -d "$folder" ]; then echo "Creating packages folder $folder..." basedir="`dirname $folder`" - if [ -d "$basedir/.svn" ] && ! svn_check $folder; then + if svn_folder $basedir && ! svn_check $folder; then ( cd $basedir chown_svn $basedir && chgrp_svn $basedir @@ -375,7 +375,7 @@ function create_repo_folder { mkdir -p $folder/$SUBFOLDER fi elif [ ! -e $folder/$SUBFOLDER ]; then - if [ -d "$folder/.svn" ] && ! svn_check $folder/$SUBFOLDER; then + if svn_folder $folder && ! svn_check $folder/$SUBFOLDER; then ( cd $folder chown_svn $folder && chgrp_svn $folder @@ -413,7 +413,7 @@ function remove_old_package_data { fi # Using subversion - if [ -d "$makepkg_repos/.svn" ]; then + if svn_folder $makepkg_repos; then ( @@ -516,7 +516,7 @@ function sign_package { function create_package { # Synchronize repository - [ $SYNC -eq $yes ] && sync_repo $SLACKBUILDS_DIR $SLACKBUILDS_SVN + [ $SYNC -eq $yes ] && sync_svn_repo $SLACKBUILDS_DIR $SLACKBUILDS_SVN # Update keyring update_keyring $SLACKBUILDS_DIR/GPG-KEY @@ -719,7 +719,7 @@ function create_package { mv $PACKAGES_DIR/$PKG_NAME.asc $NEW_REPOS/ fi - if [ -d "$NEW_REPOS/.svn" ]; then + if svn_folder $NEW_REPOS; then ( cd $NEW_REPOS chown_svn $PACKAGES_DIR && chgrp_svn $PACKAGES_DIR @@ -850,7 +850,7 @@ fi BASENAME="`basename $0`[$CREATEPKG_CHILD]" check_config -check_repo $SLACKBUILDS_DIR $SLACKBUILDS_SVN +check_svn_repo $SLACKBUILDS_DIR $SLACKBUILDS_SVN INSTALL=$off NO_DEPS=$off @@ -901,7 +901,7 @@ case $1 in build_queue $* ;; '--sync') - sync_repo $SLACKBUILDS_DIR $SLACKBUILDS_SVN + sync_svn_repo $SLACKBUILDS_DIR $SLACKBUILDS_SVN exit $EXIT_CODE ;; '--help'|'-h'|'') diff --git a/trunk/src/jail-commit b/trunk/src/jail-commit index d91a767..60e0a36 100755 --- a/trunk/src/jail-commit +++ b/trunk/src/jail-commit @@ -98,7 +98,7 @@ function template_svn_commit { # issue a svn_commit from a template folder # usage: template_svn_commit <template-folder> - if templates_under_svn && [ -d "$1/.svn" ]; then + if templates_under_svn && svn_folder $1; then cd $1 echo First checking out from the repository... svn update diff --git a/trunk/src/mkbuild b/trunk/src/mkbuild index dd04dec..1ef3328 100755 --- a/trunk/src/mkbuild +++ b/trunk/src/mkbuild @@ -253,7 +253,7 @@ function set_parameters { '--sync' ) # Synchronize mkbuilds repository mkbuild_update_keyring - sync_repo $MKBUILDS_DIR $MKBUILDS_SVN + sync_svn_repo $MKBUILDS_DIR $MKBUILDS_SVN exit $? ;; '-v'|'--version') @@ -701,7 +701,7 @@ function submit_mkbuild { local candidate oldplace # Check mkbuild directory - [ ! -d $MKBUILDS_DIR ] && build_repo $MKBUILDS_DIR $MKBUILDS_SVN + if [ ! -d $MKBUILDS_DIR ] && build_svn_repo $MKBUILDS_DIR $MKBUILDS_SVN # Get mkbuild path in parameter file MKBUILD_PATH=$SLACKBUILD_PATH @@ -784,14 +784,14 @@ function repository_status { local cwd - if [ -d "$MKBUILDS_DIR/.svn" ]; then + if svn_folder $MKBUILDS_DIR; then echo "Status of $MKBUILDS_DIR." cwd="`pwd`" cd $MKBUILDS_DIR && su_svn status cd $cwd fi - if [ -d "$SLACKBUILDS_DIR/.svn" ]; then + if svn_folder $SLACKBUILDS_DIR; then cwd="`pwd`" echo "Status of $SLACKBUILDS_DIR." cd $SLACKBUILDS_DIR && su_svn status diff --git a/trunk/src/templatepkg b/trunk/src/templatepkg index 0eee075..ba5946b 100755 --- a/trunk/src/templatepkg +++ b/trunk/src/templatepkg @@ -174,7 +174,7 @@ function import_export_templates { if [ ! -z "$2" ]; then - if [ ! -d "$templates_folder/.svn" ]; then + if ! svn_folder $templates_folder; then cd $basedir @@ -225,7 +225,7 @@ function template_create { echo Creating template `basename $TEMPLATE_BASE`... - if templates_under_svn && [ -d "`dirname $TEMPLATE_BASE`/.svn" ]; then + if templates_under_svn && svn_folder `dirname $TEMPLATE_BASE`; then cd `dirname $TEMPLATE_BASE` svn mkdir `dirname $TEMPLATE_BASE` else @@ -240,7 +240,7 @@ function template_create { touch `template_perms` touch `template_packages` - if templates_under_svn && [ -d "`dirname $TEMPLATE_BASE`/.svn" ]; then + if templates_under_svn && svn_folder `dirname $TEMPLATE_BASE`; then cd `dirname $TEMPLATE_BASE` @@ -268,7 +268,7 @@ function template_create { info_commit="yes" fi - elif templates_under_svn && [ -d "$TEMPLATE_FOLDER/.svn" ]; then + elif templates_under_svn && svn_folder "$TEMPLATE_FOLDER"; then mkdir `template_files` `template_scripts` cd $TEMPLATE_FOLDER @@ -315,7 +315,7 @@ function template_create { cat $orig_packages > `template_packages` fi - if templates_under_svn && [ -d "$orig_template/.svn" ]; then + if templates_under_svn && svn_folder $orig_template; then cd `dirname $TEMPLATE_BASE` @@ -410,7 +410,7 @@ function template_update { done - if ! svn_check `template_packages` && [ -d "`dirname $TEMPLATE_BASE`/.svn" ]; then + if ! svn_check `template_packages` && svn_folder `dirname $TEMPLATE_BASE`; then cd `dirname $TEMPLATE_BASE` svn add `basedir $(template_packages)` fi @@ -443,7 +443,7 @@ function template_add { if [ ! -a "`template_files`/$candidate" ]; then mkdir -p `template_files`/`dirname $candidate` cp -a $jail/$candidate `template_files`/$candidate - if templates_under_svn && [ -d "`template_files`/.svn" ]; then + if templates_under_svn && svn_folder `template_files`; then cwd="`pwd`" cd `template_files` svn add ./$candidate @@ -472,15 +472,15 @@ function template_add { destination="`echo $(template_files)/$file | sed -e 's/\/$//'`" - if templates_under_svn && [ -d "`template_files`/.svn" ]; then + if templates_under_svn && svn_folder `template_files`; then candidate="./`dirname $file`" - if [ ! -d "`template_files`/$candidate/.svn" ]; then + if ! svn_folder `template_files`/$candidate; then mkdir -p `template_files`/$candidate cd `template_files`/`dirname $candidate` while true; do - if [ -d ".svn" ]; then + if svn_folder $(pwd); then svn add `basename $candidate` break else @@ -550,12 +550,12 @@ function check_template_exist { mkdir $component fi - if templates_under_svn && [ -d "`dirname $TEMPLATE_BASE`/.svn" ]; then + if templates_under_svn && svn_folder `dirname $TEMPLATE_BASE`; then svn add $component info_commit="yes" fi - elif templates_under_svn && [ -d "`dirname $TEMPLATE_BASE`/.svn" ] && \ + elif templates_under_svn && svn_folder `dirname $TEMPLATE_BASE` && \ ! svn_check $component; then cd `dirname $TEMPLATE_BASE` @@ -580,7 +580,7 @@ function template_delete { if [ -e "`template_files`/$1" ]; then # first try to remove the file from the template - if templates_under_svn && [ -d "`template_files`/.svn" ]; then + if templates_under_svn && svn_folder `template_files`; then cd `template_files` svn del --force ./$1 || rm -rf ./$1 if [ -z "$SILENT" ]; then @@ -604,7 +604,7 @@ function template_delete { fi elif [ -e "`template_scripts`/$1" ]; then - if templates_under_svn && [ -d "`template_scripts`/.svn" ]; then + if templates_under_svn && svn_folder `template_scripts`; then cd `template_scripts` svn del --force ./$1 || rm -rf ./$1 if [ -z "$SILENT" ]; then @@ -640,7 +640,7 @@ function template_remove { exit 1 fi - if templates_under_svn && [ -d "$basedir/.svn" ]; then + if templates_under_svn && svn_folder $basedir; then cd $TEMPLATE_FOLDER svn update svn del --force $template @@ -729,7 +729,7 @@ function template_post_install_edit { vi `template_scripts`/$1 fi if [ "$sha1sum" != "`sha1sum $(template_scripts)/$1`" ] && \ - [ -d "`dirname $TEMPLATE_BASE`/.svn" ] && [ -z "$SILENT" ]; then + svn_folder `dirname $TEMPLATE_BASE` && [ -z "$SILENT" ]; then echo "Please run 'jail-commit --all' to send changes to the repository" fi else @@ -743,7 +743,7 @@ function template_post_install_edit { touch `template_scripts`/$1 chmod +x `template_scripts`/$1 - if [ -d "`template_scripts`/.svn" ]; then + if svn_folder `template_scripts`; then cd `template_scripts` svn add $1 if [ -z "$SILENT" ]; then @@ -774,7 +774,7 @@ function template_edit { vi `template_packages` fi if [ "$sha1sum" != "`sha1sum $(template_packages)`" ] && \ - [ -d "`dirname $TEMPLATE_BASE`/.svn" ] && [ -z "$SILENT" ]; then + svn_folder `dirname $TEMPLATE_BASE` && [ -z "$SILENT" ]; then echo "Please run 'jail-commit --all' to send changes to the repository" fi elif [ -e "`template_packages`" ]; then @@ -937,7 +937,7 @@ elif [ "$1" == "-d" ] || [ "$1" == "--delete" ]; then elif [ "$1" == "-s" ] || [ "$1" == "--sync" ]; then - if templates_under_svn && [ -d "$TEMPLATE_FOLDER/.svn" ]; then + if templates_under_svn && svn_folder $TEMPLATE_FOLDER; then ( cd $TEMPLATE_FOLDER && svn update ) true fi |