diff --git a/ChangeLog.txt b/ChangeLog.txt index 12a8e571..ded2f497 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -2,6 +2,7 @@ Added: - Quit option in new-config command Updated: +- Installation bash script - Messages and references messages - Image types for graph Fixed: diff --git a/install.sh b/install.sh index 1c0eb27e..0bcd50ff 100755 --- a/install.sh +++ b/install.sh @@ -29,23 +29,18 @@ cat slpkg/__metadata__.py | grep "__version_info__ = (" \ PRGNAM=slpkg VERSION=${VERSION:-$(__version)} -TAG=${TAG:-_dsw} # Installation script. # With this script allows you to install the slpkg as a Slackware package binary file. # Support wget download. - ARCHIVES="$PRGNAM-$VERSION.tar.gz $PRGNAM-$VERSION.zip v$VERSION.tar.gz v$VERSION.zip" cd .. for file in $ARCHIVES; do - if [ -f $file ]; then - cp $file $PRGNAM-$VERSION/slackbuild - cd $PRGNAM-$VERSION/slackbuild - chmod +x $PRGNAM.SlackBuild - ./$PRGNAM.SlackBuild - rm $file - fi + if [ -f $file ]; then + cp $file $PRGNAM-$VERSION/slackbuild + cd $PRGNAM-$VERSION/slackbuild + chmod +x $PRGNAM.SlackBuild + ./$PRGNAM.SlackBuild + rm $file + fi done - -# install or upgrade with new version -upgradepkg --install-new /tmp/$PRGNAM-$VERSION-*$TAG.t?z diff --git a/slackbuild/slpkg.SlackBuild b/slackbuild/slpkg.SlackBuild index 914a89bd..b7762e88 100755 --- a/slackbuild/slpkg.SlackBuild +++ b/slackbuild/slpkg.SlackBuild @@ -32,6 +32,7 @@ PRGNAM=slpkg VERSION=${VERSION:-$(__version)} BUILD=${BUILD:-1} TAG=${TAG:-_dsw} +INSTALL="upgradepkg --install-new" if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -121,3 +122,5 @@ cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-txz} + +$INSTALL $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz