How to install GNU shtool in Solus OS Linux [detailed manual]

Written by Administrator on Tuesday April 7, 2020

GNU shtool is a compilation of small but very stable and portable shell scripts into a single shell tool. To install this too, let's download shtool from GNU shtool official website:

$ wget ftp://ftp.gnu.org/gnu/shtool/shtool-2.0.8.tar.gz

Unzip it:

$ tar -xvf shtool-2.0.8.tar.gz

Let's look inside:

$ ls shtool-2.0.8

output:

AUTHORS       NEWS        sh.install   sh.platform  sh.tarball     test.db
ChangeLog     RATIONAL    sh.mdate     sh.prop      shtoolize.in   test.sh
configure     README      sh.mkdir     sh.rotate    shtoolize.pod  THANKS
configure.ac  sh.arx      sh.mkln      sh.scpp      shtool.m4      VERSION
COPYING       sh.common   sh.mkshadow  sh.slo       shtool.pod
INSTALL       sh.echo     sh.move      sh.subst     shtool.spec
Makefile.in   sh.fixperm  sh.path      sh.table     sh.version

Oh, INSTALL file, good. Let's read it:

$ cat INSTALL

output:

       _     _              _
   ___| |__ | |_ ___   ___ | |
  / __| '_ \| __/ _ \ / _ \| |
  \__ \ | | | || (_) | (_) | |
  |___/_| |_|\__\___/ \___/|_|

  GNU shtool -- The GNU Portable Shell Tool
  ____________________________________________________________________

  INSTALLATION

  Usually you want to use shtool inside the source tree of your own free
  software package (say it stays under /path/to/mypkg). For this you first
  have compile the `shtool' script and then just copy it over to your own
  source tree. To achieve this run in your shell:

    $ ./configure
    $ make
    $ make test
    $ cp shtool /path/to/mypkg/shtool

  Additionally you can use `shtoolize' to first assemble a custom `shtool'
  script (here with the modules `install', `mkdir' and `tarball':

    $ ./configure
    $ make
    $ make test
    $ shtoolize install mkdir tarball
    $ cp shtool /path/to/mypkg/shtool

  Also please notice the license terms which apply to the generated shtool
  program. You can find them at the top of the generated shtool program file.

  Alternatively you can also install shtool in a system wide location (for
  easier upgrading from there or to make shtool available for users from
  within the shell). To install shtool into /path/to/shtool/{bin,man}/ perform
  the following steps in your shell:

    $ ./configure --prefix=/path/to/shtool
    $ make
    $ make test
    $ make install

  Please keep in mind that although the building of `shtool' requires Perl 5
  the generated `shtool' script does _NOT_ require Perl under runtime, of
  course.

Ok, let's follow manual:

$ ./configure
Configuring GNU shtool (Portable Shell Tool), version 2.0.8 (18-Jul-2008)
Copyright (c) 1994-2008 Ralf S. Engelschall <rse@engelschall.com>
checking whether make sets $(MAKE)... yes
checking for perl interpreter... /usr/bin/perl
checking for pod2man conversion tool... /usr/bin/pod2man
configure: creating ./config.status
config.status: creating Makefile
config.status: creating shtoolize
config.status: executing adjustment commands

Good, configured, then:

$ make
building program shtool
./shtoolize -o shtool all
Generating shtool...(echo 11808/12742 bytes)...(mdate 3695/4690 bytes)...(table 1818/2753 bytes)...(prop 1109/2038 bytes)...(move 2685/3614 bytes)...(install 4567/5495 bytes)...(mkdir 2904/3821 bytes)...(mkln 4429/5361 bytes)...(mkshadow 3260/4193 bytes)...(fixperm 1471/2403 bytes)...(rotate 13425/14331 bytes)...(tarball 5297/6214 bytes)...(subst 5255/6180 bytes)...(platform 21739/22662 bytes)...(arx 2401/3312 bytes)...(slo 4139/5066 bytes)...(scpp 6295/7206 bytes)...(version 10234/11160 bytes)...(path 4041/4952 bytes)
building manpage shtoolize.1
building manpage shtool.1
building manpage shtool-echo.1
building manpage shtool-mdate.1
shtool-mdate.tmp around line 222: You forgot a '=back' before '=head1'
POD document had syntax errors at /usr/bin/pod2man line 69.
building manpage shtool-table.1
building manpage shtool-prop.1
building manpage shtool-move.1
building manpage shtool-install.1
building manpage shtool-mkdir.1
shtool-mkdir.tmp around line 186: You forgot a '=back' before '=head1'
POD document had syntax errors at /usr/bin/pod2man line 69.
building manpage shtool-mkln.1
building manpage shtool-mkshadow.1
shtool-mkshadow.tmp around line 191: You forgot a '=back' before '=head1'
POD document had syntax errors at /usr/bin/pod2man line 69.
building manpage shtool-fixperm.1
building manpage shtool-rotate.1
building manpage shtool-tarball.1
building manpage shtool-subst.1
building manpage shtool-platform.1
building manpage shtool-arx.1
building manpage shtool-slo.1
building manpage shtool-scpp.1
building manpage shtool-version.1
building manpage shtool-path.1

Good, built!

Now let's run test:

$ make test
Running test suite:
echo...........ok
mdate..........ok
table..........ok
prop...........ok
move...........ok
install........ok
mkdir..........ok
mkln...........ok
mkshadow.......ok
fixperm........ok
rotate.........ok
tarball........ok
subst..........ok
platform.......ok
arx............ok
slo............ok
scpp...........ok
version........ok
path...........ok
OK: passed: 19/19

Good. Seems that we did all correct.

Now, let's make final check:

edustorage@edustorage ~/Downloads/shtool-2.0.8 $ ./shtool --version

and output:

GNU shtool 2.0.8 (18-Jul-2008)

shtool is installed and we can use it.

 

Category: linux Tags: install solus GNU_shtool shtool