Updated installation bash script

This commit is contained in:
Dimitris Zlatanidis 2015-09-17 06:44:26 +03:00
parent 0f03a57873
commit b158259629
3 changed files with 11 additions and 12 deletions

View file

@ -2,6 +2,7 @@
Added: Added:
- Quit option in new-config command - Quit option in new-config command
Updated: Updated:
- Installation bash script
- Messages and references messages - Messages and references messages
- Image types for graph - Image types for graph
Fixed: Fixed:

View file

@ -29,23 +29,18 @@ cat slpkg/__metadata__.py | grep "__version_info__ = (" \
PRGNAM=slpkg PRGNAM=slpkg
VERSION=${VERSION:-$(__version)} VERSION=${VERSION:-$(__version)}
TAG=${TAG:-_dsw}
# Installation script. # Installation script.
# With this script allows you to install the slpkg as a Slackware package binary file. # With this script allows you to install the slpkg as a Slackware package binary file.
# Support wget download. # Support wget download.
ARCHIVES="$PRGNAM-$VERSION.tar.gz $PRGNAM-$VERSION.zip v$VERSION.tar.gz v$VERSION.zip" ARCHIVES="$PRGNAM-$VERSION.tar.gz $PRGNAM-$VERSION.zip v$VERSION.tar.gz v$VERSION.zip"
cd .. cd ..
for file in $ARCHIVES; do for file in $ARCHIVES; do
if [ -f $file ]; then if [ -f $file ]; then
cp $file $PRGNAM-$VERSION/slackbuild cp $file $PRGNAM-$VERSION/slackbuild
cd $PRGNAM-$VERSION/slackbuild cd $PRGNAM-$VERSION/slackbuild
chmod +x $PRGNAM.SlackBuild chmod +x $PRGNAM.SlackBuild
./$PRGNAM.SlackBuild ./$PRGNAM.SlackBuild
rm $file rm $file
fi fi
done done
# install or upgrade with new version
upgradepkg --install-new /tmp/$PRGNAM-$VERSION-*$TAG.t?z

View file

@ -32,6 +32,7 @@ PRGNAM=slpkg
VERSION=${VERSION:-$(__version)} VERSION=${VERSION:-$(__version)}
BUILD=${BUILD:-1} BUILD=${BUILD:-1}
TAG=${TAG:-_dsw} TAG=${TAG:-_dsw}
INSTALL="upgradepkg --install-new"
if [ -z "$ARCH" ]; then if [ -z "$ARCH" ]; then
case "$( uname -m )" in case "$( uname -m )" in
@ -121,3 +122,5 @@ cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-txz} /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-txz}
$INSTALL $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz