Commit ff18d85a authored by Pierre-Yves Fourmond's avatar Pierre-Yves Fourmond

Fixed Issue #24

parent 8e43eef0
# Linux Installer for ARchives
## 0. Table of contents
## Table of contents
- [Features](#1-features)
- [Installation](#2-installation)
- [Sample use](#3-sample-use)
- [Documentation](#4-documentation)
- [Dependencies](#5-dependencies)
- [Tested software](#6-tested-software)
- [Docker image](#7-docker-image)
- [License](#8-license)
- [Features](#features)
- [Installation](#installation)
- [Sample use](#sample-use)
- [Documentation](#documentation)
- [Dependencies](#dependencies)
- [Tested software](#tested-software)
- [Docker image](#docker-image)
- [License](#license)
**L**inux **I**nstaller for **AR**chives a.k.a `liar` is an easy to use command to install software packaged as an archive on Linux systems.
......@@ -19,7 +19,7 @@ Moreover there is an increasing need to not only being able to install software
That's why `liar` addresses simply these needs with a standalone Shell script to install, list and remove software packaged in an archive file of one of the following formats: **.tar** **.tar.bz2** **.tar.gz** **.tar.xz** **.tar.Z** **.tbz2** **.tgz** and **.zip**.
Very few dependencies are needed, see [Dependencies](#5-dependencies) section for details.
Very few dependencies are needed, see [Dependencies](#dependencies) section for details.
It is developed on [Debian GNU/Linux](https://www.debian.org) version 9.4 using **dash** version 0.5.8-2.4.
......@@ -27,7 +27,7 @@ Additionally, tests are done on Debian version 8.10 with dash version 0.5.7-4+b1
`liar` conformance to **sh** syntax is checked with [ShellCheck](https://www.shellcheck.net) and [checkbashisms](https://sourceforge.net/projects/checkbaskisms/) tools.
## 1. Features
## Features
`liar` provides installation, listing and removal of tarball packaged software in a simple command with:
......@@ -45,9 +45,9 @@ Additionally, tests are done on Debian version 8.10 with dash version 0.5.7-4+b1
It can install Atom, Go, Gradle, IntelliJ IDEA, JDK, Robo 3T, Sublime Text and many more.
For a complete list of tarball delivered software installable with `liar`, see [Tested Software](#6-tested-software).
For a complete list of tarball delivered software installable with `liar`, see [Tested Software](#tested-software).
### 1.1 New features
### New features
Starting from [0.2-dev version](https://framagit.org/grumpyf0x48/liar/tree/master), the following features and changes have been added:
......@@ -60,7 +60,7 @@ Starting from [0.2-dev version](https://framagit.org/grumpyf0x48/liar/tree/maste
- list command output can be sorted by any column
- Ability to upgrade liar in development version
## 2. Installation
## Installation
`liar` first released version is [version 0.1](https://framagit.org/grumpyf0x48/liar/tree/0.1).
......@@ -70,11 +70,11 @@ View the most commonly used commands in the [Getting started with Linux Installe
<a href="https://asciinema.org/a/109135?autoplay=1" title="Getting started with Linux Installer for Archives" target="_blank"><img src="GettingStarted.png" width="65%" height="65%" /></a>
To install the released version, jump to [Released version installation](#22-released-version-installation).
To install the released version, jump to [Released version installation](#released-version-installation).
Otherwise, go on with the development version.
### 2.1 Development version installation
### Development version installation
`liar` current development version is [version 0.2-dev](https://framagit.org/grumpyf0x48/liar/tree/master).
......@@ -84,14 +84,14 @@ This version adds to the released version:
- Improvements for binaries filtering in symbolic links creation
- Simplified usage with samples only displayed in verbose mode
It also adds automatic Bash completion of software names and urls for [tested softwares](#6-tested-software):
It also adds automatic Bash completion of software names and urls for [tested softwares](#tested-software):
- When pressing TAB key after 'install' keyword, tested softwares are proposed
- After the software name is entered, a TAB key press completes the command line with the latest known URL (for x86_64 architecture)
Please consult the following section to know more about [new features](#11-new-features).
Please consult the following section to know more about [new features](#new-features).
### 2.1.1 Basic installation
### Basic installation
$ sudo curl -L https://git.framasoft.org/grumpyf0x48/liar/raw/master/liar -o /usr/local/bin/liar
......@@ -103,7 +103,7 @@ Then:
$ sudo chmod 755 /usr/local/bin/liar
### 2.1.2 Bash completion installation
### Bash completion installation
`liar` supports Bash command line completion for options, commands and parameters. Default values for options with parameters is also handled.
......@@ -117,9 +117,9 @@ Alternatively you can also use wget:
Then, start a new Bash interpreter.
### 2.2 Released version installation
### Released version installation
### 2.2.1 Basic installation
### Basic installation
To install `liar` 0.1 version, simply enter:
......@@ -133,7 +133,7 @@ Then:
$ sudo chmod 755 /usr/local/bin/liar
### 2.2.2 All-in-one command installation
### All-in-one command installation
More simply, you can also use the all-in-one install command:
......@@ -143,7 +143,7 @@ Or:
$ sudo wget https://git.framasoft.org/grumpyf0x48/liar/raw/0.1/liar -O /usr/local/bin/liar && sudo chmod 0755 !#:4
### 2.2.3 Installation without sysadmin rights
### Installation without sysadmin rights
Without sysadmin rights, use the following command:
......@@ -153,7 +153,7 @@ Or:
$ wget https://git.framasoft.org/grumpyf0x48/liar/raw/0.1/liar -O ~/bin/liar && chmod 0755 !#:3
### 2.2.4 Bash completion installation
### Bash completion installation
To install Bash command line completion, enter the following command:
......@@ -165,9 +165,9 @@ Alternatively you can also use wget:
Then, start a new Bash interpreter.
## 3. Sample use
## Sample use
### 3.1 Installing a JDK in the default destination folder
### Installing a JDK in the default destination folder
$ liar install jdk8 https://download.java.net/openjdk/jdk8u40/ri/openjdk-8u40-b25-linux-x64-10_feb_2015.tar.gz
Installing 'jdk8' from 'https://download.java.net/openjdk/jdk8u40/ri/openjdk-8u40-b25-linux-x64-10_feb_2015.tar.gz' to '/home/debian/Programs/jdk8'
......@@ -176,7 +176,7 @@ Then, start a new Bash interpreter.
In this first sample, The JDK has been installed under the name jdk8 in `$HOME/Programs`, which is the default destination folder.
### 3.1.1 Installing a JDK with symbolic links created
### Installing a JDK with symbolic links created
$ liar -v -l -s ~/bin -p "jre/bin/*" install jdk8 Downloads/openjdk-8u40-b25-linux-x64-10_feb_2015.tar.gz
Enabling verbose mode
......@@ -199,7 +199,7 @@ In this first sample, The JDK has been installed under the name jdk8 in `$HOME/P
Creating link: '/home/debian/bin/keytool' -> '/home/debian/Programs/jdk8/java-se-8u40-ri/jre/bin/keytool'
Creating link: '/home/debian/bin/tnameserv' -> '/home/debian/Programs/jdk8/java-se-8u40-ri/jre/bin/tnameserv'
### 3.2 Installing Sublime Text in another destination folder
### Installing Sublime Text in another destination folder
$ liar -d ~/Extras/ install sublime Downloads/sublime_text_3_build_3126_x64.tar.bz2
Installing 'sublime' from 'Downloads/sublime_text_3_build_3126_x64.tar.bz2' to '/home/debian/Extras/sublime'
......@@ -207,7 +207,7 @@ In this first sample, The JDK has been installed under the name jdk8 in `$HOME/P
Here, Sublime Text has been installed in `$HOME/Extras`, the destination folder specified with option `-d`.
### 3.3 Installing Sublime Text from the http url
### Installing Sublime Text from the http url
$ liar install sublime3 http://download.sublimetext.com/sublime_text_3_build_3126_x64.tar.bz2
Installing 'sublime3' from 'http://download.sublimetext.com/sublime_text_3_build_3126_x64.tar.bz2' to '/home/debian/Programs/sublime3'
......@@ -224,7 +224,7 @@ Here, Sublime Text has been installed in `$HOME/Extras`, the destination folder
Extracting '/home/debian/.liar_cache/sublime_text_3_build_3126_x64.tar.bz2' to '/home/debian/Programs/sublime3'
### 3.4 Installing Robomongo with symbolic links created
### Installing Robomongo with symbolic links created
$ liar -l install robomongo ~/Downloads/robomongo-0.9.0-linux-x86_64-0786489.tar.gz
Installing 'robomongo' from '/home/debian/Downloads/robomongo-0.9.0-linux-x86_64-0786489.tar.gz' to '/home/debian/Programs/robomongo'
......@@ -233,7 +233,7 @@ Here, Sublime Text has been installed in `$HOME/Extras`, the destination folder
With this fourth example, Robomongo has been installed with symbolic links created in `~/bin` for all executables found. Here, only one executable has been found. When `liar` removes a software all symbolic links created during installation are removed.
### 3.5 Installing Maven
### Installing Maven
$ liar -l install maven3 ~/Downloads/apache-maven-3.3.9-bin.zip
Installing 'maven3' from '/home/debian/Downloads/apache-maven-3.3.9-bin.zip' to '/home/debian/Programs/maven3'
......@@ -253,7 +253,7 @@ To restrict which files are symlinked:
Here we have restricted symlink creation to the mvn executable.
### 3.6 Installing IntelliJ IDEA in verbose mode with one symbolic link created
### Installing IntelliJ IDEA in verbose mode with one symbolic link created
$ liar -v -l -p idea.sh install idea-community https://download.jetbrains.com/idea/ideaIC-2017.1.tar.gz
Enabling verbose mode
......@@ -283,7 +283,7 @@ Here we have restricted symlink creation to the mvn executable.
The other executables available are the ones of the JDK, so we do not create links for them.
### 3.7 Installing IntelliJ IDEA with checksum verification
### Installing IntelliJ IDEA with checksum verification
$ liar -v -c fa2dfe2697d3e7637cd16f14cec00931d2097c84 install idea ~/Downloads/ideaIC-2017.2.5.tar.gz
Enabling verbose mode
......@@ -296,7 +296,7 @@ The other executables available are the ones of the JDK, so we do not create lin
Checking '/home/debian/Downloads/ideaIC-2017.2.5.tar.gz' 'sha1' checksum verification
Extracting '/home/debian/Downloads/ideaIC-2017.2.5.tar.gz' to '/home/debian/Programs/idea'
### 3.8 Installing Tor Browser
### Installing Tor Browser
$ liar -l -p start-tor-browser install torbrowser ~/Downloads/tor-browser-linux64-6.0.8_fr.tar.xz
Installing 'torbrowser' from '/home/debian/Downloads/tor-browser-linux64-6.0.8_fr.tar.xz' to '/home/debian/Programs/torbrowser'
......@@ -305,7 +305,7 @@ The other executables available are the ones of the JDK, so we do not create lin
In the Tor Browser installation, we have restricted symbolic link creation to the start-tor-browser executable.
### 3.9 Installing Gradle
### Installing Gradle
$ liar -v -l -p gradle install gradle ~/Downloads/gradle-4.2.1-bin.zip
Enabling verbose mode
......@@ -317,7 +317,7 @@ In the Tor Browser installation, we have restricted symbolic link creation to th
Extracting '/home/debian/.liar_cache/gradle-4.2.1-bin.zip' to '/home/debian/Programs/gradle'
Creating link: '/home/debian/bin/gradle' -> '/home/debian/Programs/gradle/gradle-4.2.1/bin/gradle'
### 3.10 Installing Go
### Installing Go
$ liar -l -p "bin/go" install go https://dl.google.com/go/go1.11.1.linux-amd64.tar.gz
Installing 'go' from 'https://dl.google.com/go/go1.11.1.linux-amd64.tar.gz' to '/home/debian/Programs/go'
......@@ -325,7 +325,7 @@ In the Tor Browser installation, we have restricted symbolic link creation to th
Extracting '/home/debian/.liar_cache/go1.11.1.linux-amd64.tar.gz' to '/home/debian/Programs/go'
Creating link: '/home/debian/bin/go'
### 3.11 Installing GoLand
### Installing GoLand
$ liar -v -l -p goland.sh install goland https://download-cf.jetbrains.com/go/goland-2018.2.3.tar.gz
Enabling verbose mode
......@@ -349,7 +349,7 @@ In the Tor Browser installation, we have restricted symbolic link creation to th
Extracting '/home/debian/.debian_cache/goland-2018.2.3.tar.gz' to '/home/debian/Programs/goland'
Creating link: '/home/debian/bin/goland.sh' -> '/home/debian/Programs/goland/GoLand-2018.2.3/bin/goland.sh'
### 3.12 Installing a software while being root
### Installing a software while being root
$ sudo liar install maven ~/Downloads/apache-maven-3.3.9-bin.tar.gz
liar cannot be run as root. Please use '-r' option.
......@@ -363,7 +363,7 @@ Then when adding `-r` option:
Installing 'maven' from '/home/debian/Downloads/apache-maven-3.3.9-bin.tar.gz' to '/root/Programs/maven'
Extracting '/root/.liar_cache/apache-maven-3.3.9-bin.tar.gz' to '/root/Programs/maven'
### 3.13 List what you have installed
### List what you have installed
$ liar list
Listing installed software in '/home/debian/Programs'
......@@ -376,7 +376,7 @@ Then when adding `-r` option:
list command displays installation name, folder, from which archive file the installation was done and the installation date.
### 3.14 Removing previously installed software
### Removing previously installed software
$ liar remove sublime3
Removing 'sublime3' installed in '/home/debian/Programs/sublime3'
......@@ -388,11 +388,11 @@ Moreover, this command can also remove multiple software at once, for example:
$ liar remove sublime3 robo3t
## 4. Documentation
## Documentation
This section describes how `liar` works, which commands options and parameters it accepts.
### 4.1 Commands
### Commands
`liar` supports the following commands:
......@@ -412,7 +412,7 @@ used to:
- Getting `liar` version
- Upgrade `liar` (development version only)
#### 4.1.1 help
#### help
To get help of `liar` usage, simply enter:
......@@ -460,7 +460,7 @@ With `-v` option, `liar` help output also includes sample commands:
liar -v -S-5 list
liar -r -d /opt/liar-installations list
#### 4.1.2 install
#### install
In its simplest form, the install command takes only two parameters.
......@@ -477,9 +477,9 @@ The parameters are:
Additionnaly, ALL `liar` options can be used to alter the install command behavior.
See [Options and parameters](#42-options-and-parameters) section for more details.
See [Options and parameters](#options-and-parameters) section for more details.
#### 4.1.3 list
#### list
The list command displays which software are installed in the DESTINATION folder:
......@@ -534,7 +534,7 @@ To sort the output using another column, `-S` option may be used. For example, t
A negative value supplied to `-S` option will reverse the sort.
#### 4.1.4 remove
#### remove
The remove command takes an unique parameter, the name of the software to remove, which is the one that was given when installing.
......@@ -552,14 +552,14 @@ When removing a software, a confirmation is asked to the user. This confirmation
The remove command can be used with the general options described below.
#### 4.1.5 version
#### version
To display the version of `liar` being used, enter:
$ liar version
liar version 0.1
#### 4.1.6 upgrade
#### upgrade
The upgrade command is for development purposes and can only be used when you have installed the current developement version.
......@@ -573,7 +573,7 @@ For non-root installations:
$ liar upgrade
### 4.2 Options and parameters
### Options and parameters
Now that we have seen which commands `liar` implements, let's see the options they can use, and the parameters they need.
......@@ -597,7 +597,7 @@ Command parameters are:
- software NAME
- archive FILE_PATH
#### 4.2.1 Destination folder
#### Destination folder
`liar` helps you to install remove and list software that is packaged as a tarball, the FILE_PATH, in a folder of your choice, the DESTINATION folder.
......@@ -605,7 +605,7 @@ DESTINATION folder default value is: `$HOME/Programs`.
This option can be used with install, list and remove commands.
#### 4.2.2 Name
#### Name
When installing a software `liar` needs two mandatory parameters, the NAME and the FILE_PATH.
......@@ -613,13 +613,13 @@ NAME is used to create a sub-folder in the DESTINATION folder in order to instal
The NAME parameter is also mandatory when removing a software. Several NAME parameters may also be supplied to the remove command when removing several softwares at a time.
#### 4.2.3 File path
#### File path
FILE_PATH is the path of the archive containing the software to install.
The FILE_PATH parameter is specific to the install command.
#### 4.2.4 Symbolic links creation
#### Symbolic links creation
After a software is installed `liar` can optionally create symbolic links for installed executables to a folder of your choice, the folder for SYMBOLIC links creation.
......@@ -632,23 +632,23 @@ The folder for SYMBOLIC links creation is optional and has the following default
- `/usr/local/bin` for root installation
- `$HOME/bin` otherwise
#### 4.2.5 Verbose mode
#### Verbose mode
When option `-v` is set, verbose mode is activated. In this mode, some commands display more detailed output when executed.
#### 4.2.6 Root usage
#### Root usage
By default, `liar` will not let you install, list nor remove software when logged as root. To allow root usage `-r` option should be used.
#### 4.2.7 Bypass cache
#### Bypass cache
`liar` uses an internal cache for the archives it installs. It is used for example for download resume. This cache may be disabled when installing a local archive using `-b` option.
#### 4.2.8 Bypass user confirmation
#### Bypass user confirmation
When removing one or several softwares, a confirmation is asked to the user to prevent unwanted removal. To skip this confirmation, `-f` option may be used.
#### 4.2.9 Download user agent
#### Download user agent
When installing an archive that is downloaded from the internet, the default user agent is `wget`.
......@@ -658,7 +658,7 @@ It is possible to change this behavior using `-a` flag with one of the following
- curl
- wget
#### 4.2.10 Checksum type and value
#### Checksum type and value
`liar` supports checksum verification for downloaded file path.
......@@ -668,7 +668,7 @@ For example:
$ liar -t sha256 -c a5a4f948d259734ac5649122d0c2f7e885b48162cde78e43415638cbfd7a7aa3 install idea_community https://download-cf.jetbrains.com/idea/ideaIC-2018.1.1.tar.gz
### 4.3 Configuration files
### Configuration files
`liar` uses two configuration files located in `$HOME`.
......@@ -676,9 +676,9 @@ These files are created automatically at `liar` first use.
The user can modify these files, but he should keep in mind that these modifications may be lost if the configuration files are updated by a new version of `liar`.
#### 4.3.1 .liar_mime_types
#### .liar_mime_types
When creating [symbolic links](#424-symbolic-links-creation), this file is used to determine whether a file is an executable or not.
When creating [symbolic links](#symbolic-links-creation), this file is used to determine whether a file is an executable or not.
`.liar_mime_types` looks like:
......@@ -694,9 +694,9 @@ text/x-python
text/x-sh
```
#### 4.3.2 .liar_software
#### .liar_software
This file describes which software `liar` can install and where to download them. It is used by [command line completion](#21-development-version-installation).
This file describes which software `liar` can install and where to download them. It is used by [command line completion](#bash-completion-installation).
The beginning of `.liar_software` is:
......@@ -713,7 +713,7 @@ gradle=https://downloads.gradle.org/distributions/gradle-4.8.1-bin.zip
Of course, the user can add software to this file to suit his needs.
## 5. Dependencies
## Dependencies
`liar` requires nothing more than a Bourne Shell i.e. **sh** or compatible one with the following packages installed:
......@@ -738,7 +738,7 @@ If installed, **xdg-utils** package will be used to filter executables when crea
Finally, **bash-completion** is required when using Bash command line completion.
## 6. Tested software
## Tested software
`liar` has been tested with the following softwares:
......@@ -760,7 +760,7 @@ Finally, **bash-completion** is required when using Bash command line completion
Asciinema is no longer tested as it is not delivered anymore as an [archive](https://discourse.asciinema.org/t/changes-in-asciinema-packaging/90).
## 7. Docker image
## Docker image
`liar` docker image is based on Debian Stretch and has the latest development version of liar installed.
......@@ -768,7 +768,7 @@ To use it:
$ docker run -it grumpyf0x48/liar
## 8. License
## License
Copyright (C) 2017 Pierre-Yves Fourmond.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment