Motivation

If you have root rights or sudo with a package manager, don’t use me!.

But, sometimes you are in one of the following scenarios

your host is too old, without vendor support

you have not root rights, and you need to keep your software up to date

you want to compile from sources you trust

you want to try new releases without waiting until they are packaged

you are a nerd

you are a nerd, and it is Saturday night

ok, seriously: you are a nerd and you want to try a new software, avoiding to mess with your system binaries

Usage

.software has only one feature: installing software locally!

It is implemented by a bash function named .software_install that takes the software want to install as argument.

For example

.software_install Foo

Optionally, a custom version number can be passed as a second argument

.software_install Foo 2.3.4

Typing .software_install in your bash prompt, and hitting TAB will autocomplete with available software.
Take a look to Software list, which includes Perl, Node, Golang, Ruby among others.

Installation

Requirements

Please note that .software supports Linux and OS X, but could work on other Unix-like systems, like BSD.
In order to run, .software requires bash, Tar, Gzip, Grep, Findutils and Wget.
Other requirements are those needed by software builds: Make, gcc, etc.

Otherwise you can add manually these lines to your .bash_profile.
Note that if you are using .software from a graphical environment rather than a remote server login shell, you should edit .bashrc file instead.

DOTSOFTWARE_ROOT_DIR

.software uses enviroment variable DOTSOFTWARE_ROOT_DIR to know the dir where all your software will be installed.

It defaults to ~/.software.

You maybe want to edit it when

you have not enough space in your home directory.

you want to install in a directory common to many users like /usr/local or /opt.

Note that .software by default do not download sources if they are already in folder $DOTSOFTWARE_ROOT_DIR/src.
This information can be useful when you need to install software without an Internet connection.

Instead of setting a DOTSOFTWARE_ROOT_DIR variable, another choice is to create a symbolic link from your /dotsoftware/root/dir to ~/.software/ dir.

Variable PGDATA defines the directory where PostgreSQL stores data and configuration.
It defaults to $DOTSOFTWARE_ROOT_DIR/opt/pgsql/data.

On build, commands initdb and createdb are launched: this means that
database instance is initialized and a database named as your unix user is created.
Set variable PGDATABASE in your environment to customize database name.

Common actions are:

Stop database: stop_postresql

Start database: start_postgresql

Connect to database: psql

Reload configuration: pg_ctl reload

Configuration files can be found in $PGDATA directory.
For example, to enable connections to all users and databases from
IP 10.20.30.40, to a PostgreSQL instance running on an host with an IP 1.2.3.4,

~/.software/etc/profile

~/.software/etc/profile.d/

~/.software/README.md

This file, contains also software versions. Every software must have an homonym section in this file
where version number is in the second row, like this

### [Foo](http://url-of-foo-homepage.xxx)
> version 1.2.3

Packaging software

.software installs software locally downloading and compiling sources.
This process can be time and cpu consuming, so, if you have two or more similar machines is not that difficult to build only once, then package your result and installing it on other hosts.
The requirement are

The hosts has the same system software (OS, kernel, etc) and environment.

The variable DOTSOFTWARE_ROOT_DIR has the same value on every host. Note that, using default value implies that users has the same name.