aboutsummaryrefslogtreecommitdiff
path: root/trunk
diff options
context:
space:
mode:
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2008-11-27 17:25:45 +0000
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2008-11-27 17:25:45 +0000
commit27b59b59e8fb3deefe10be5225ab6bf9c80dc0b6 (patch)
treea29851bd1d27f414db037e2597bc50cf02774a07 /trunk
parentc110049805e03798f335970c9543a567c58de4e7 (diff)
downloadsimplepkg-27b59b59e8fb3deefe10be5225ab6bf9c80dc0b6.tar.gz
simplepkg-27b59b59e8fb3deefe10be5225ab6bf9c80dc0b6.tar.bz2
fixes
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@544 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'trunk')
-rw-r--r--trunk/lib/common.sh2
-rw-r--r--trunk/src/createpkg34
2 files changed, 20 insertions, 16 deletions
diff --git a/trunk/lib/common.sh b/trunk/lib/common.sh
index 1ce8381..857d01e 100644
--- a/trunk/lib/common.sh
+++ b/trunk/lib/common.sh
@@ -365,7 +365,7 @@ function default_distro {
fi
else
if [ -f "$1/etc/slackware-version" ]; then
- cat $1/etc/slackware-version | awk '{ print $1 }'
+ cat $1/etc/slackware-version | awk '{ print $1 }' | tr '[[:upper:]]' '[[:lower:]]'
else
echo slackware
fi
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