mirror of
https://github.com/sbopkg/sbopkg
synced 2024-11-10 03:50:33 +03:00
added more error checking when building a package; tweaked the new general search
This commit is contained in:
parent
e1b46f0d1a
commit
50c2d0c28f
@ -416,7 +416,7 @@ gen_search_package () {
|
||||
# cli not dialog.
|
||||
cd $LOCALREPO/$SLACKVER
|
||||
PKG=$1
|
||||
RESULTS=$(find . -type d | grep $PKG | sed -e 's/.\///')
|
||||
RESULTS=$(find . -mindepth 2 -type d | grep $PKG | sed -e 's/.\///')
|
||||
if [ -n "$RESULTS" ]; then
|
||||
if [ "$DIAG" = 1 ]; then
|
||||
#for i in ${RESULTS[*]%/}; do
|
||||
@ -467,7 +467,7 @@ if [ ! -e $PKGPATH/$SRCNAME ]; then
|
||||
ln -s $SRCDIR/$SRCNAME $LOCALREPO/$SLACKVER/$PKGPATH/$SRCNAME
|
||||
else
|
||||
cd $SRCDIR
|
||||
wget -T 20 $DOWNLOAD || exit 1
|
||||
wget -T 20 $DOWNLOAD || rm -rf $TMP/sbopkg_build.lck && exit 1
|
||||
cd -
|
||||
ln -s $SRCDIR/$SRCNAME $LOCALREPO/$SLACKVER/$PKGPATH/$SRCNAME
|
||||
fi
|
||||
@ -486,14 +486,15 @@ if [ "$MD5CHK" == $MD5SUM ]; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "MD5SUM check failed. Exiting."
|
||||
continue
|
||||
rm -rf $TMP/sbopkg_build.lck
|
||||
break
|
||||
fi
|
||||
echo "Building Slackware package for "$SRCNAME"..."
|
||||
if [ "$SLACKBUILD" = "original" ]; then
|
||||
sh $PKG.SlackBuild
|
||||
sh $PKG.SlackBuild || rm -rf $TMP/sbopkg_build.lck
|
||||
fi
|
||||
if [ "$SLACKBUILD" = "local" ]; then
|
||||
sh $PKG.SlackBuild.sbopkg
|
||||
sh $PKG.SlackBuild.sbopkg || rm -rf $PKG/sbopkg_build.lck
|
||||
fi
|
||||
echo "Done building $PKG."
|
||||
rm -rf $TMP/sbopkg_build.lck
|
||||
|
Loading…
Reference in New Issue
Block a user