aboutsummaryrefslogtreecommitdiff
path: root/trunk
diff options
context:
space:
mode:
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2008-12-01 21:38:19 +0000
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2008-12-01 21:38:19 +0000
commit4937fac1ac2b62e6c4113ac449bc5fa7718a1b7c (patch)
treef34495e7ddb3d51e60cfa1f7eeff017e868dbb46 /trunk
parent9b206aef5e74368a2b98edf60be163140fc10117 (diff)
downloadsimplepkg-4937fac1ac2b62e6c4113ac449bc5fa7718a1b7c.tar.gz
simplepkg-4937fac1ac2b62e6c4113ac449bc5fa7718a1b7c.tar.bz2
mkbuild: remove stuff from old places at the repository
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@620 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'trunk')
-rwxr-xr-xtrunk/src/mkbuild32
-rwxr-xr-xtrunk/src/simplaret4
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"