aboutsummaryrefslogtreecommitdiff
path: root/trunk/src/createpkg
diff options
context:
space:
mode:
Diffstat (limited to 'trunk/src/createpkg')
-rw-r--r--trunk/src/createpkg34
1 files changed, 19 insertions, 15 deletions
diff --git a/trunk/src/createpkg b/trunk/src/createpkg
index 6e978eb..2661788 100644
--- a/trunk/src/createpkg
+++ b/trunk/src/createpkg
@@ -535,10 +535,10 @@ fi
if [ $REMOVE_OLD_PACKAGE -eq $on ]; then
# Using subversion
- if [ -d "`basename $NEW_REPOS`/.svn" ]; then
+ if [ -d "$MAKEPKG_REPOS/.svn" ]; then
cwd="`pwd`"
- cd `basename $NEW_REPOS`
+ cd $MAKEPKG_REPOS
PACKAGE_VERSION="`package_version $PKG_NAME`"
PACKAGE_ARCH="`package_arch $PKG_NAME`"
@@ -546,12 +546,14 @@ if [ $REMOVE_OLD_PACKAGE -eq $on ]; then
for file in `ls $PACKAGE-*-*-*.tgz`; do
if svn_check $file; then
- # Just deleted packages with different arch, version or build number
+ # Just delete packages with different arch, version or build number
if [ "`package_version $file`" != "$PACKAGE_VERSION" ] || \
[ "`package_arch $file`" != "$PACKAGE_ARCH" ] || \
[ "`package_build $file`" != "$PACKAGE_BUILD" ]; then
svn del --force $file
fi
+ else
+ rm $file
fi
done
@@ -564,26 +566,28 @@ fi
# Move package to SlackBuilds-like tree
if [ $MOVE_BIN_PACKAGE -eq $on ]; then
+
mv $MAKEPKG_REPOS/$PKG_NAME $NEW_REPOS/
- if [ -d "`basename $NEW_REPOS`/.svn" ]; then
+ if [ -d "$NEW_REPOS/.svn" ]; then
cwd="`pwd`"
- cd `basename $NEW_REPOS`
+ cd $NEW_REPOS
svn add $PKG_NAME
cd $cwd
fi
-fi
-# Move package's slack-required to binary repository
-if [ $MOVE_SLACK_REQUIRED -eq $on ]; then
- if [ ! -z "$SLACK_REQUIRED" ]; then
- cp $SLACK_REQUIRED $NEW_REPOS/$PACKAGE.slack-required
- if ! svn_check $NEW_REPOS/$PACKAGE.slack-required; then
- cwd="`pwd`"
- cd `basename $NEW_REPOS`
- svn add $PACKAGE.slack-required
- cd $cwd
+ # Move package's slack-required to binary repository
+ if [ $MOVE_SLACK_REQUIRED -eq $on ]; then
+ if [ ! -z "$SLACK_REQUIRED" ]; then
+ cp $SLACK_REQUIRED $NEW_REPOS/$PACKAGE.slack-required
+ if [ -d "$NEW_REPOS/.svn" ] && ! svn_check $NEW_REPOS/$PACKAGE.slack-required; then
+ cwd="`pwd`"
+ cd $NEW_REPOS
+ svn add $PACKAGE.slack-required
+ cd $cwd
+ fi
fi
fi
+
fi
# Install package