diff options
Diffstat (limited to 'trunk')
-rwxr-xr-x | trunk/src/mkbuild | 32 | ||||
-rwxr-xr-x | trunk/src/simplaret | 4 |
2 files changed, 27 insertions, 9 deletions
diff --git a/trunk/src/mkbuild b/trunk/src/mkbuild index 60ca2de..e79b023 100755 --- a/trunk/src/mkbuild +++ b/trunk/src/mkbuild @@ -566,12 +566,10 @@ function apply_mkpatch { function submit_slackbuild { # Submit SlackBuild in local Slack.Sarava tree - #if [ $UID -ne 0 ]; then - # echo "Only root can submit SlackBuilds..." - # return 1 - #fi echo -e "\nSubmiting $SLACKBUILD" + local candidate oldplace + # check SlackBuilds directory [ ! -e $SLACKBUILDS_DIR ] && createpkg --sync @@ -581,6 +579,16 @@ function submit_slackbuild { # Add SlackBuild scripts # check path [ ! -e $SLACKBUILD_PATH ] && svn_mkdir $SLACKBUILD_PATH + + # remove stuff in old places + for candidate in `find . -name $SLACKBUILD`; do + oldplace="`dirname $candidate | sed -e 's/^\.\///'`" + if [ "$oldplace" != "`dirname $SLACKBUILD_PATH | sed -e 's/^\.\///'`" ]; then + echo "Removing SlackBuild found at old path $oldplace" + svn_del $oldplace + fi + done + # add SlackBuild svn_copy $WORK/$SLACKBUILD $SLACKBUILD_PATH @@ -599,12 +607,10 @@ function submit_slackbuild { function submit_mkbuild { # Submit mkbuild in local mkbuild Slack.Sarava tree - #if [ $UID -ne 0 ]; then - # echo "Only root can submit mkbuild..." - # return 1 - #fi echo -e "\nSubmiting $MKBUILD_NAME" + local candidate oldplace + # check mkbuild directory [ ! -d $MKBUILDS_DIR ] && build_repo $MKBUILDS_DIR $MKBUILDS_SVN @@ -617,6 +623,16 @@ function submit_mkbuild { # Add mkbuild scripts # check path [ ! -e $MKBUILD_PATH ] && svn_mkdir $MKBUILD_PATH + + # remove stuff in old places + for candidate in `find . -name $MKBUILD_NAME`; do + oldplace="`dirname $candidate | sed -e 's/^\.\///'`" + if [ "$oldplace" != "`dirname $MKBUILD_PATH | sed -e 's/^\.\///'`" ]; then + echo "Removing mkbuild found at old path $oldplace" + svn_del $oldplace + fi + done + # add mkbuild svn_copy $WORK/$MKBUILD_NAME $MKBUILD_PATH diff --git a/trunk/src/simplaret b/trunk/src/simplaret index b36f4c4..ec24ded 100755 --- a/trunk/src/simplaret +++ b/trunk/src/simplaret @@ -1,6 +1,6 @@ #!/bin/bash # -# simplaret $Rev$: simplepkg's retrieval tool +# simplaret: simplepkg's retrieval tool # feedback: rhatto at riseup.net | gpl # # Simplaret is free software; you can redistribute it and/or modify it under the @@ -15,6 +15,8 @@ # this program; if not, write to the Free Software Foundation, Inc., 59 Temple # Place - Suite 330, Boston, MA 02111-1307, USA # +# $Rev$ - $Author$ +# BASENAME="`basename $0`" COMMON="/usr/libexec/simplepkg/common.sh" |