App-instopt

 view release on metacpan or  search on metacpan

script/instopt  view on Meta::CPAN

 download_dir = /home/ujang/software

 # if not the default /opt
 install_dir = !path ~/opt

 # if not the default /usr/local/bin
 program_dir = !path ~/bin

Then:

 # List all installed software in /opt
 % instopt list-installed
 % instopt list-installed -l

 # List installed versions of a software in /opt
 % instopt list-installed-versions firefox

 # Compare installed versions vs downloaded vs latest, for all installed software
 % instopt compare-versions

 # Download a software (e.g. firefox), will be put in $ARCHIVE/f/firefox/<VERSION>/<ARCH>/
 % instopt download firefox

 # Download all known software
 % instopt download-all

 # List all downloaded software
 % instopt list-downloaded
 % instopt list-downloaded -l

 # List downloaded versions of a software
 % instopt list-downloaded-versions firefox
 % instopt list-downloaded-versions -l firefox

 # Update (download + install) a software in /opt
 % instopt update firefox

 # Update all software in /opt
 % instopt update-all

 # Cleanup installed dir (remove inactive versions)
 % instopt cleanup-install-dir

 # Cleanup download dir (remove older versions)
 % instopt cleanup-download-dir


 # Update program to the latest from CPAN
 % instopt --self-upgrade ; # or -U

=head1 DESCRIPTION

B<STATUS:> Early, experimental release. Many things can change without notice.

B<instopt> is an opinionated tool to automate downloading and installing
software binaries (by default to F</opt>, hence the name: "B<inst>all to
/B<opt>"). To describe how it works, I'll describe how I install my software to
F</opt>.

Normally, I depend on the package manager of my OS (Linux distribution) to
install software. But some software need to be updated more often. Let's take as
example B<firefox>, where the OS version is usually too old for my taste. I'll
usually do this:

=over

=item 1.

Go to the Mozilla download page and download the latest firefox binary, let's
say F<firefox-99.1.2.tar.bz2>.

=item 2.

Save this file to F<~/software/f/firefox/99.1.2/linux-x86_64/>, so I can share
this with my other laptops and PC, to avoid redownloading the same stuff.

=item 3.

To install, I do the rest of the steps as root. I extract the tarball to
F</opt/firefox-99.1.2/>.

=item 4.

I create (or update) symlink F</opt/firefox> to point to F</opt/firefox-99.1.2>.

=item 5.

I create (or update) symlink F</usr/local/bin/firefox> to
F</opt/firefox/firefox>.

=back

When a new version of Firefox comes out, I do the following:

=over

=item 1.

Go to the Mozilla website. Download the latest Firefox tarball, e.g.
F<firefox-99.1.3.tar.bz2>.

=item 2.

Save it to F<~/software/f/firefox/99.1.3/linux-x86_64/>.

=item 3.

Extract the tarball to F</opt/firefox-99.1.3>.

=item 4.

Update the symlink F</opt/firefox> to point to F</opt/firefox-99.1.3>.

=item 5.

Optionally delete F</opt/firefox-99.1.2>.

=back

B<instopt> is the tool I wrote to automate the above tasks. Now I only need to
do:



( run in 0.556 second using v1.01-cache-2.11-cpan-0bb4e1dffa6 )