added install.sh

This commit is contained in:
Dimitris Zlatanidis 2014-08-30 04:17:11 +03:00
parent b88451df95
commit 271125487a
4 changed files with 57 additions and 7 deletions

View file

@ -1,8 +1,9 @@
Version 1.7.9
29-08-2014
30-08-2014
[Feature] - Added extra and pasture packages from official Slackware
tree.
- Added install.sh script.
[Updated] - Remove destination file after copy to sbo script directory.
Version 1.7.8

14
INSTALL
View file

@ -15,7 +15,11 @@ Install slpkg
There are mainly four ways:
1) Using the SlackBuild script in the directory slpkg-?.?.?/slackbuild.
1) Download latest slpkg version from https://github.com/dslackw/slpkg/releases
Untar or unzip the archive, cd in slpkg-?.?.? directory.
Run install.sh in this directory `./install.sh` and slpkg auto-installed.
2) Using the SlackBuild script in the directory slpkg-?.?.?/slackbuild.
Untar the archive `tar xvf slpkg-?.?.?.tar.gz`
@ -27,16 +31,16 @@ There are mainly four ways:
SlackBuild package created so install package with `upgradepkg --install-new
/tmp/slpkg-?.?.?-x86_64-1_dsw.tgz` (x86_64 for Slackware64).
2) Using pip:
3) Using pip:
`pip install slpkg` or upgrade `pip install --upgrade slpkg`
3) Download slpkg package from slackbuilds.org and run the first procedure described above.
4) Download slpkg package from slackbuilds.org and run the first procedure described above.
4) Download binary package from sourceforge:
5) Download binary package from sourceforge:
https://sourceforge.net/projects/slpkg/
Proposed mode if you want to have installed the most updated version is 1 and 2
Proposed mode if you want to have installed the most updated version is 1 or 2 and 3
process.

41
install.sh Executable file
View file

@ -0,0 +1,41 @@
#!/bin/sh
# Copyright 2014 Dimitris Zlatanidis Greece-Orestiada
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=slpkg
VERSION=${VERSION:-1.7.8}
TAG=${TAG:-_dsw}
cd ..
# select archive to copy in slackbuild directory
if [ -f $PRGNAM-$VERSION.zip ]; then
cp $PRGNAM-$VERSION.zip $PRGNAM-$VERSION/slackbuild
cd $PRGNAM-$VERSION/slackbuild
chmod +x $PRGNAM.SlackBuild
./$PRGNAM.SlackBuild
else
cp $PRGNAM-$VERSION.tar.gz $PRGNAM-$VERSION/slackbuild
cd $PRGNAM-$VERSION/slackbuild
chmod +x $PRGNAM.SlackBuild
./$PRGNAM.SlackBuild
fi
# install or upgrade with new version
upgradepkg --install-new /tmp/$PRGNAM-$VERSION-*$TAG.tgz

View file

@ -60,7 +60,11 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz || tar xvf $CWD/v$VERSION.tar.gz
if [ -f $CWD/$PRGNAM-$VERSION.tar.gz ]; then
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz || tar xvf $CWD/v$VERSION.tar.gz
else
unzip $CWD/$PRGNAM-$VERSION.zip
fi
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \