README.md 40.2 KB
Newer Older
pyfourmond's avatar
pyfourmond committed
1
# Linux Installer for ARchives
2

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
3
## Table of contents
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
4

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
5 6 7 8 9 10 11
- [Features](#features)
- [Installation](#installation)
- [Sample use](#sample-use)
- [Documentation](#documentation)
- [Dependencies](#dependencies)
- [Tested software](#tested-software)
- [Docker image](#docker-image)
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
12
- [Similar software](#similar-software)
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
13
- [License](#license)
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
14

15
**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.
pyfourmond's avatar
pyfourmond committed
16

17
Nowadays more and more software and tools are delivered as a tarball or compressed one instead of being installed from Linux official repositories. A typical example of this is [JDK](http://jdk.java.net/). It also happens that a software present in the Linux repository is not up to date enough for your needs.
pyfourmond's avatar
pyfourmond committed
18

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
19
Moreover there is an increasing need to not only being able to install software without having administrator privileges but also to have the ability to install several versions of the same software on the same machine.
pyfourmond's avatar
pyfourmond committed
20

21
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**.
pyfourmond's avatar
pyfourmond committed
22

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
23
Very few dependencies are needed, see [Dependencies](#dependencies) section for details.
pyfourmond's avatar
pyfourmond committed
24

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
25
It is developed on [Debian GNU/Linux](https://www.debian.org) version 9.11 using **dash** version 0.5.8-2.4.
26

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
27
Additionally, tests are done on Debian version 8.11 with dash version 0.5.7-4+b1.
pyfourmond's avatar
pyfourmond committed
28

29
`liar` conformance to **sh** syntax is checked with [ShellCheck](https://www.shellcheck.net) and [checkbashisms](https://sourceforge.net/projects/checkbaskisms/) tools.
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
30

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
31
## Features
32

33
`liar` provides installation, listing and removal of tarball packaged software in a simple command with:
34

35
- Installation of software archives located on filesystem or network
36
- Destination folder selection
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
37
- Internal software archives cache, optional for local archives
38
- Download user agent choice (wget, curl or aria2c) for network archives
39
- Download resume (network archives)
40
- Secure installation to prevent software duplicates in a given destination folder
41
- Integrity for non `liar` installed software or unknown folder as `liar` does not remove nor list software it has not installed itself
42 43
- Secure software removal guaranteed by interactive user confirmation
- Optional root usage
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
44
- Symbolic links creation for installed binaries with folder selection and binaries filtering
45
- Bash command line completion to help entry of options, commands and parameters
46

47
It can install Atom, Go, Gradle, IntelliJ IDEA, JDK Reference Implementations, Robo 3T, Sublime Text and many more.
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
48

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
49
For a complete list of tarball delivered software installable with `liar`, see [Tested Software](#tested-software).
50

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
51
## Installation
pyfourmond's avatar
pyfourmond committed
52

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
53
`liar` [version 0.1](https://framagit.org/grumpyf0x48/liar/tree/0.1) has been released on Fri, 14 Apr 2017.
54

55
View the most commonly used commands in the [Getting started with Linux Installer for Archives](https://asciinema.org/a/109135) video:
56

57
<a href="https://asciinema.org/a/109135?autoplay=1" title="Getting started with Linux Installer for Archives" target="_blank"><img src="GettingStarted.png" width="50%" height="50%" /></a>
58

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
59
To install the released version, jump to [Released version installation](#released-version-installation).
60

61
Otherwise, go on with the development version.
62

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
63
### Development version installation
64

65
`liar` current development version is [version 0.2-dev](https://framagit.org/grumpyf0x48/liar/tree/master).
66

67
Since `liar` version 0.1, the following features and changes have been added to the current version.
68

69 70 71
#### New features

- Software archive checksum verification (md5, sha1, sha256 or sha512)
72 73
- Improvements for binaries filtering in symbolic links creation
- Simplified usage with samples only displayed in verbose mode
74 75 76 77 78 79
- Automatic completion of software names and urls for more than 20 tested softwares (for x86_64 architecture)
- Remove command is now able to remove several softwares at a time
- Complete rewrite of command line completion
- list command output can be sorted by any column
- Ability to upgrade liar and [.liar_software](#liar_software) file from the [Git repository](https://framagit.org/grumpyf0x48/liar) (development version only)
- Multiple patterns can now be used for symbolic links creation
80

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
81
### Basic installation
82

83 84 85 86 87 88 89 90 91 92
    $ sudo curl -L https://git.framasoft.org/grumpyf0x48/liar/raw/master/liar -o /usr/local/bin/liar

or you can use wget instead:

    $ sudo wget https://git.framasoft.org/grumpyf0x48/liar/raw/master/liar -O /usr/local/bin/liar

Then:

    $ sudo chmod 755 /usr/local/bin/liar

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
93
### Bash completion installation
94

95 96 97
`liar` supports Bash command line completion for options, commands and parameters. Default values for options with parameters is also handled.

To use it, enter the following command:
98

99
    $ sudo curl -L https://git.framasoft.org/grumpyf0x48/liar/raw/master/liar-completion -o /etc/bash_completion.d/liar-completion
100 101 102

Alternatively you can also use wget:

103
    $ sudo wget https://git.framasoft.org/grumpyf0x48/liar/raw/master/liar-completion -O /etc/bash_completion.d/liar-completion
104

105 106
Then, start a new Bash interpreter.

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
107
### Released version installation
108

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
109
### Basic installation
110 111

To install `liar` 0.1 version, simply enter:
112

113
    $ sudo curl -L https://git.framasoft.org/grumpyf0x48/liar/raw/0.1/liar -o /usr/local/bin/liar
114

115
Or you can use wget instead:
116

117
    $ sudo wget https://git.framasoft.org/grumpyf0x48/liar/raw/0.1/liar -O /usr/local/bin/liar
118 119 120

Then:

121
    $ sudo chmod 755 /usr/local/bin/liar
pyfourmond's avatar
pyfourmond committed
122

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
123
### All-in-one command installation
124

125
More simply, you can also use the all-in-one install command:
126 127 128 129 130

    $ sudo curl -L https://git.framasoft.org/grumpyf0x48/liar/raw/0.1/liar -o /usr/local/bin/liar && sudo chmod 0755 !#:5

Or:

131
    $ sudo wget https://git.framasoft.org/grumpyf0x48/liar/raw/0.1/liar -O /usr/local/bin/liar && sudo chmod 0755 !#:4
132

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
133
### Installation without sysadmin rights
134 135

Without sysadmin rights, use the following command:
136

137
    $ curl -L https://git.framasoft.org/grumpyf0x48/liar/raw/0.1/liar -o ~/bin/liar && chmod 0755 !#:4
138 139 140

Or:

141
    $ wget https://git.framasoft.org/grumpyf0x48/liar/raw/0.1/liar -O ~/bin/liar && chmod 0755 !#:3
142

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
143
### Bash completion installation
144

145
To install Bash command line completion, enter the following command:
146

147
    $ sudo curl -L https://git.framasoft.org/grumpyf0x48/liar/raw/0.1/liar-completion -o /etc/bash_completion.d/liar-completion
148 149 150

Alternatively you can also use wget:

151
    $ sudo wget https://git.framasoft.org/grumpyf0x48/liar/raw/0.1/liar-completion -O /etc/bash_completion.d/liar-completion
152 153 154

Then, start a new Bash interpreter.

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
155
## Sample use
pyfourmond's avatar
pyfourmond committed
156

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
157
### Installing a JDK in the default destination folder
pyfourmond's avatar
pyfourmond committed
158

159 160 161 162
    $ 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'
    2018-07-22 14:29:16 URL:https://download.java.net/openjdk/jdk8u40/ri/openjdk-8u40-b25-linux-x64-10_feb_2015.tar.gz [174937067/174937067] -> "/home/debian/.liar_cache/openjdk-8u40-b25-linux-x64-10_feb_2015.tar.gz" [1]
    Extracting '/home/debian/.liar_cache/openjdk-8u40-b25-linux-x64-10_feb_2015.tar.gz' to '/home/debian/Programs/jdk8'
pyfourmond's avatar
pyfourmond committed
163

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
164
In this first sample, The JDK has been installed under the name jdk8 in `$HOME/Programs`, which is the default destination folder.
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
165

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
166
### Installing a JDK with symbolic links created
167

168 169
Here, we specify the revelant pattern so as to create a symbolic link for each binary in `$JAVA_HOME/bin`:

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
170
    $ liar -v -l -p "bin/*" install jdk_ri8 openjdk-8u40-b25-linux-x64-10_feb_2015.tar.gz
171
    Enabling verbose mode
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
172
    Setting BIN_PATTERNS to 'bin/*'
173
    DESTINATION option is not set, Using '/home/debian/Programs' by default
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219
    Installing 'jdk_ri8' from 'openjdk-8u40-b25-linux-x64-10_feb_2015.tar.gz' to '/home/debian/Programs/jdk_ri8'
    Caching 'openjdk-8u40-b25-linux-x64-10_feb_2015.tar.gz' to '/home/debian/.liar_cache/openjdk-8u40-b25-linux-x64-10_feb_2015.tar.gz'
    Creating '/home/debian/Programs/jdk_ri8'
    Checking if an installation of '/home/debian/.liar_cache/openjdk-8u40-b25-linux-x64-10_feb_2015.tar.gz' already exists in '/home/debian/Programs' ...
    Extracting '/home/debian/.liar_cache/openjdk-8u40-b25-linux-x64-10_feb_2015.tar.gz' to '/home/debian/Programs/jdk_ri8'
    Creating link: '/home/debian/bin/jar' -> '/home/debian/Programs/jdk_ri8/java-se-8u40-ri/bin/jar'
    Creating link: '/home/debian/bin/extcheck' -> '/home/debian/Programs/jdk_ri8/java-se-8u40-ri/bin/extcheck'
    Creating link: '/home/debian/bin/javac' -> '/home/debian/Programs/jdk_ri8/java-se-8u40-ri/bin/javac'
    Creating link: '/home/debian/bin/xjc' -> '/home/debian/Programs/jdk_ri8/java-se-8u40-ri/bin/xjc'
    Creating link: '/home/debian/bin/servertool' -> '/home/debian/Programs/jdk_ri8/java-se-8u40-ri/bin/servertool'
    Creating link: '/home/debian/bin/jstack' -> '/home/debian/Programs/jdk_ri8/java-se-8u40-ri/bin/jstack'
    Creating link: '/home/debian/bin/idlj' -> '/home/debian/Programs/jdk_ri8/java-se-8u40-ri/bin/idlj'
    Creating link: '/home/debian/bin/pack200' -> '/home/debian/Programs/jdk_ri8/java-se-8u40-ri/bin/pack200'
    Creating link: '/home/debian/bin/jconsole' -> '/home/debian/Programs/jdk_ri8/java-se-8u40-ri/bin/jconsole'
    Creating link: '/home/debian/bin/jinfo' -> '/home/debian/Programs/jdk_ri8/java-se-8u40-ri/bin/jinfo'
    Creating link: '/home/debian/bin/jrunscript' -> '/home/debian/Programs/jdk_ri8/java-se-8u40-ri/bin/jrunscript'
    Creating link: '/home/debian/bin/policytool' -> '/home/debian/Programs/jdk_ri8/java-se-8u40-ri/bin/policytool'
    Creating link: '/home/debian/bin/orbd' -> '/home/debian/Programs/jdk_ri8/java-se-8u40-ri/bin/orbd'
    Creating link: '/home/debian/bin/serialver' -> '/home/debian/Programs/jdk_ri8/java-se-8u40-ri/bin/serialver'
    Creating link: '/home/debian/bin/jdb' -> '/home/debian/Programs/jdk_ri8/java-se-8u40-ri/bin/jdb'
    Creating link: '/home/debian/bin/rmiregistry' -> '/home/debian/Programs/jdk_ri8/java-se-8u40-ri/bin/rmiregistry'
    Creating link: '/home/debian/bin/jps' -> '/home/debian/Programs/jdk_ri8/java-se-8u40-ri/bin/jps'
    Creating link: '/home/debian/bin/javah' -> '/home/debian/Programs/jdk_ri8/java-se-8u40-ri/bin/javah'
    Creating link: '/home/debian/bin/wsgen' -> '/home/debian/Programs/jdk_ri8/java-se-8u40-ri/bin/wsgen'
    Creating link: '/home/debian/bin/appletviewer' -> '/home/debian/Programs/jdk_ri8/java-se-8u40-ri/bin/appletviewer'
    Creating link: '/home/debian/bin/javap' -> '/home/debian/Programs/jdk_ri8/java-se-8u40-ri/bin/javap'
    Creating link: '/home/debian/bin/rmic' -> '/home/debian/Programs/jdk_ri8/java-se-8u40-ri/bin/rmic'
    Creating link: '/home/debian/bin/unpack200' -> '/home/debian/Programs/jdk_ri8/java-se-8u40-ri/bin/unpack200'
    Creating link: '/home/debian/bin/rmid' -> '/home/debian/Programs/jdk_ri8/java-se-8u40-ri/bin/rmid'
    Creating link: '/home/debian/bin/jdeps' -> '/home/debian/Programs/jdk_ri8/java-se-8u40-ri/bin/jdeps'
    Creating link: '/home/debian/bin/native2ascii' -> '/home/debian/Programs/jdk_ri8/java-se-8u40-ri/bin/native2ascii'
    Creating link: '/home/debian/bin/jjs' -> '/home/debian/Programs/jdk_ri8/java-se-8u40-ri/bin/jjs'
    Creating link: '/home/debian/bin/jmap' -> '/home/debian/Programs/jdk_ri8/java-se-8u40-ri/bin/jmap'
    Creating link: '/home/debian/bin/jsadebugd' -> '/home/debian/Programs/jdk_ri8/java-se-8u40-ri/bin/jsadebugd'
    Creating link: '/home/debian/bin/java' -> '/home/debian/Programs/jdk_ri8/java-se-8u40-ri/bin/java'
    Creating link: '/home/debian/bin/jstat' -> '/home/debian/Programs/jdk_ri8/java-se-8u40-ri/bin/jstat'
    Creating link: '/home/debian/bin/java-rmi.cgi' -> '/home/debian/Programs/jdk_ri8/java-se-8u40-ri/bin/java-rmi.cgi'
    Creating link: '/home/debian/bin/jcmd' -> '/home/debian/Programs/jdk_ri8/java-se-8u40-ri/bin/jcmd'
    Creating link: '/home/debian/bin/keytool' -> '/home/debian/Programs/jdk_ri8/java-se-8u40-ri/bin/keytool'
    Creating link: '/home/debian/bin/javadoc' -> '/home/debian/Programs/jdk_ri8/java-se-8u40-ri/bin/javadoc'
    Creating link: '/home/debian/bin/jarsigner' -> '/home/debian/Programs/jdk_ri8/java-se-8u40-ri/bin/jarsigner'
    Creating link: '/home/debian/bin/schemagen' -> '/home/debian/Programs/jdk_ri8/java-se-8u40-ri/bin/schemagen'
    Creating link: '/home/debian/bin/tnameserv' -> '/home/debian/Programs/jdk_ri8/java-se-8u40-ri/bin/tnameserv'
    Creating link: '/home/debian/bin/jhat' -> '/home/debian/Programs/jdk_ri8/java-se-8u40-ri/bin/jhat'
    Creating link: '/home/debian/bin/wsimport' -> '/home/debian/Programs/jdk_ri8/java-se-8u40-ri/bin/wsimport'
    Creating link: '/home/debian/bin/jstatd' -> '/home/debian/Programs/jdk_ri8/java-se-8u40-ri/bin/jstatd'
220

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
221
### Installing Sublime Text in another destination folder
pyfourmond's avatar
pyfourmond committed
222

223 224 225
    $ 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'
    Extracting '/home/debian/.liar_cache/sublime_text_3_build_3126_x64.tar.bz2' to '/home/debian/Extras/sublime'
pyfourmond's avatar
pyfourmond committed
226

227
Here, Sublime Text has been installed in `$HOME/Extras`, the destination folder specified with option `-d`.
pyfourmond's avatar
pyfourmond committed
228

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
229
### Installing Sublime Text from the http url
230

231 232 233
    $ 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'
    --2017-01-24 10:42:17--  http://download.sublimetext.com/sublime_text_3_build_3126_x64.tar.bz2
234 235 236 237 238 239 240
    Résolution de download.sublimetext.com (download.sublimetext.com)… 104.236.0.104
    Connexion à download.sublimetext.com (download.sublimetext.com)|104.236.0.104|:443… connecté.
    requête HTTP transmise, en attente de la réponse… 200 OK
    Taille : 9313954 (8,9M) [application/octet-stream]
    Sauvegarde en : « /home/debian/.liar_cache/sublime_text_3_build_3126_x64.tar.bz2 »

    /home/debian/.liar_cache/sublime_ 100%[=============================================================>]   8,88M  1,04MB/s   ds 7,3s
pyfourmond's avatar
pyfourmond committed
241

242 243 244 245
    2017-01-24 10:42:25 (1,22 MB/s) — « /home/debian/.liar_cache/sublime_text_3_build_3126_x64.tar.bz2 » sauvegardé [9313954/9313954]

    Extracting '/home/debian/.liar_cache/sublime_text_3_build_3126_x64.tar.bz2' to '/home/debian/Programs/sublime3'

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
246
### Installing Robomongo with symbolic links created
247 248 249 250 251

    $ 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'
    Extracting '/home/debian/.liar_cache/robomongo-0.9.0-linux-x86_64-0786489.tar.gz' to '/home/debian/Programs/robomongo'
    Creating link: '/home/debian/bin/robomongo'
252

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
253
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.
pyfourmond's avatar
pyfourmond committed
254

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
255
### Installing Maven
256

257 258 259 260 261 262
    $ 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'
    Extracting '/home/debian/.liar_cache/apache-maven-3.3.9-bin.zip' to '/home/debian/Programs/maven3'
    Creating link: '/home/debian/bin/mvn'
    Creating link: '/home/debian/bin/mvnyjp'
    Creating link: '/home/debian/bin/mvnDebug'
263

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
264
Maven has been installed with symbolic links created in `~/bin` for all executables. In this example, three executables have been found.
pyfourmond's avatar
pyfourmond committed
265 266

To restrict which files are symlinked:
267

268 269 270 271
    $ liar -l -p mvn 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'
    Extracting '/home/debian/Downloads/apache-maven-3.3.9-bin.zip' to '/home/debian/Programs/maven3'
    Creating link: '/home/debian/bin/mvn'
272

273
Here we have restricted symlink creation to the mvn executable.
pyfourmond's avatar
pyfourmond committed
274

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
275
### Installing IntelliJ IDEA in verbose mode with one symbolic link created
276

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
277
    $ liar -v -l -p idea.sh install idea-community https://download.jetbrains.com/idea/ideaIC-2017.1.tar.gz
278
    Enabling verbose mode
279
    DESTINATION option is not set, Using '/home/debian/Programs' by default
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
280 281 282
    Installing 'idea-community' from 'https://download.jetbrains.com/idea/ideaIC-2017.1.tar.gz' to '/home/debian/Programs/idea-community'
    Downloading 'https://download.jetbrains.com/idea/ideaIC-2017.1.tar.gz' to '/home/debian/.liar_cache/ideaIC-2017.1.tar.gz'
    --2017-01-24 10:57:10--  https://download.jetbrains.com/idea/ideaIC-2017.1.tar.gz
283 284 285
    Résolution de download.jetbrains.com (download.jetbrains.com)… 54.217.236.18
    Connexion à download.jetbrains.com (download.jetbrains.com)|54.217.236.18|:443… connecté.
    requête HTTP transmise, en attente de la réponse… 302 Moved Temporarily
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
286 287
    Emplacement : https://download-cf.jetbrains.com/idea/ideaIC-2017.1.tar.gz [suivant]
    --2017-01-24 10:57:11--  https://download-cf.jetbrains.com/idea/ideaIC-2017.1.tar.gz
288 289 290
    Résolution de download-cf.jetbrains.com (download-cf.jetbrains.com)… 52.85.69.86, 52.85.69.93, 52.85.69.184, ...
    Connexion à download-cf.jetbrains.com (download-cf.jetbrains.com)|52.85.69.86|:443… connecté.
    requête HTTP transmise, en attente de la réponse… 200 OK
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
291 292
    Taille : 427717734 (408M) [binary/octet-stream]
    Sauvegarde en : « /home/debian/.liar_cache/ideaIC-2017.1.tar.gz »
293 294 295

    /home/debian/.liar_cache/ideaIC-2 100%[=============================================================>] 391,57M  7,49MB/s   ds 52s

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
296
    2017-01-24 10:58:03 (7,47 MB/s) — « /home/debian/.liar_cache/ideaIC-2017.1.tar.gz » sauvegardé [427717734/427717734]
297 298

    Creating '/home/debian/Programs/idea-community'
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
299 300
    Checking if an installation of '/home/debian/.liar_cache/ideaIC-2017.1.tar.gz' already exists in '/home/debian/Programs' ...
    Extracting '/home/debian/.liar_cache/ideaIC-2017.1.tar.gz' to '/home/debian/Programs/idea-community'
301
    Creating link: '/home/debian/bin/idea.sh'
302 303 304

The other executables available are the ones of the JDK, so we do not create links for them.

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
305
### Installing IntelliJ IDEA with checksum verification
306 307 308 309 310 311 312 313 314 315 316 317

    $ liar -v -c fa2dfe2697d3e7637cd16f14cec00931d2097c84 install idea ~/Downloads/ideaIC-2017.2.5.tar.gz
    Enabling verbose mode
    Setting checksum to 'fa2dfe2697d3e7637cd16f14cec00931d2097c84'
    DESTINATION option is not set, Using '/home/debian/Programs' by default
    CHECKSUM type is not set, Using 'sha1' by default
    Installing 'idea' from '/home/debian/Downloads/ideaIC-2017.2.5.tar.gz' to '/home/debian/Programs/idea'
    Creating '/home/debian/Programs/idea'
    Checking if an installation of '/home/debian/Downloads/ideaIC-2017.2.5.tar.gz' already exists in '/home/debian/Programs' ...
    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'

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
318
### Installing Tor Browser
pyfourmond's avatar
pyfourmond committed
319

320 321 322 323
    $ 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'
    Extracting '/home/debian/.liar_cache/tor-browser-linux64-6.0.8_fr.tar.xz' to '/home/debian/Programs/torbrowser'
    Creating link: '/home/debian/bin/start-tor-browser'
pyfourmond's avatar
pyfourmond committed
324

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
325
In the Tor Browser installation, we have restricted symbolic link creation to the start-tor-browser executable.
pyfourmond's avatar
pyfourmond committed
326

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
327
### Installing Gradle
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
328 329 330 331 332 333 334 335 336 337 338

    $ liar -v -l -p gradle install gradle ~/Downloads/gradle-4.2.1-bin.zip
    Enabling verbose mode
    DESTINATION option is not set, Using '/home/debian/Programs' by default
    Installing 'gradle' from '/home/debian/Downloads/gradle-4.2.1-bin.zip' to '/home/debian/Programs/gradle'
    Caching '/home/debian/Downloads/gradle-4.2.1-bin.zip' to '/home/debian/.liar_cache/gradle-4.2.1-bin.zip'
    Creating '/home/debian/Programs/gradle'
    Checking if an installation of '/home/debian/.liar_cache/gradle-4.2.1-bin.zip' already exists in '/home/debian/Programs' ...
    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'

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
339
### Installing Go
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
340 341 342 343 344 345 346

    $ 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'
    2018-10-11 04:49:33 URL:https://dl.google.com/go/go1.11.1.linux-amd64.tar.gz [127205934/127205934] -> "/home/debian/.liar_cache/go1.11.1.linux-amd64.tar.gz" [1]
    Extracting '/home/debian/.liar_cache/go1.11.1.linux-amd64.tar.gz' to '/home/debian/Programs/go'
    Creating link: '/home/debian/bin/go'

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
347
### Installing GoLand
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
348 349 350

    $ liar -v -l -p goland.sh install goland https://download-cf.jetbrains.com/go/goland-2018.2.3.tar.gz
    Enabling verbose mode
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
351
    Setting BIN_PATTERNS to 'goland.sh'
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370
    DESTINATION option is not set, Using '/home/debian/Programs' by default
    Installing 'goland' from 'https://download-cf.jetbrains.com/go/goland-2018.2.3.tar.gz' to '/home/debian/Programs/goland'
    Downloading 'https://download-cf.jetbrains.com/go/goland-2018.2.3.tar.gz' to '/home/debian/.debian_cache/goland-2018.2.3.tar.gz' using 'wget --verbose'
    --2018-10-11 04:53:15--  https://download-cf.jetbrains.com/go/goland-2018.2.3.tar.gz
    Resolving download-cf.jetbrains.com (download-cf.jetbrains.com)... 143.204.192.6, 143.204.192.19, 143.204.192.75, ...
    Connecting to download-cf.jetbrains.com (download-cf.jetbrains.com)|143.204.192.6|:443... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 254186919 (242M) [binary/octet-stream]
    Saving to: '/home/debian/.debian_cache/goland-2018.2.3.tar.gz'

    /home/debian/.debian_cache/goland-201 100%[===========================================================>] 242.41M   582KB/s    in 2m 23s

    2018-10-11 04:55:37 (1.70 MB/s) - '/home/debian/.debian_cache/goland-2018.2.3.tar.gz' saved [254186919/254186919]

    Creating '/home/debian/Programs/goland'
    Checking if an installation of '/home/debian/.debian_cache/goland-2018.2.3.tar.gz' already exists in '/home/debian/Programs' ...
    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'

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
371 372
### Installing Postman

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
373
    $ liar -n -l -p Postman install postman https://dl.pstmn.io/download/latest/linux64
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
374 375 376 377 378 379 380 381
    Enabling content disposition
    Installing 'postman' from 'https://dl.pstmn.io/download/latest/linux64' to '/home/debian/Programs/postman'
    2019-05-04 06:14:28 URL:https://dl.pstmn.io/download/latest/linux64 [68479716/68479716] -> "/home/debian/.liar_cache/Postman-linux-x64-7.0.9.tar.gz" [1]
    Extracting '/home/debian/.liar_cache/Postman-linux-x64-7.0.9.tar.gz' to '/home/debian/Programs/postman'
    Creating link: '/home/debian/bin/Postman'

Postman supplied URL makes uses of the content-disposition header, that's why we need to use the `-n` flag here.

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
382
### Installing a software while being root
383

384
    $ sudo liar install maven ~/Downloads/apache-maven-3.3.9-bin.tar.gz
385
    liar cannot be run as root. Please use '-r' option.
386

387
By default `liar` does not allow root installation for security reasons.
pyfourmond's avatar
pyfourmond committed
388

389
Then when adding `-r` option:
390

391
    $ sudo liar -r install maven ~/Downloads/apache-maven-3.3.9-bin.tar.gz
392
    Allowing root usage
393 394
    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'
395

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
396
### List what you have installed
397 398

    $ liar list
399
    Listing installed software in '/home/debian/Programs'
400

401
    Name           Folder             File Path                              Date        Time
402

403
    torbrowser     tor-browser_fr     tor-browser-linux64-6.5_fr.tar.xz      2017/01/30  09:42:33
404
    maven          apache-maven-3.3   apache-maven-3.3.9-bin.tar.gz          2017/03/26  08:17:52
405
    sublime        sublime_text_3     sublime_text_3_build_3126_x64.tar.bz   2016/12/20  11:55:32
406

407
list command displays installation name, folder, from which archive file the installation was done and the installation date.
pyfourmond's avatar
pyfourmond committed
408

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
409
### Removing previously installed software
410

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
411 412 413
    $ liar remove sublime3
    Removing 'sublime3' installed in '/home/debian/Programs/sublime3'
    Do you want to remove 'sublime3' installed in '/home/debian/Programs/sublime3' (Y/N) ? Y
pyfourmond's avatar
pyfourmond committed
414

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
415
When removing a software, a confirmation is asked to the user unless `-f` option is used.
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
416 417 418 419

Moreover, this command can also remove multiple software at once, for example:

    $ liar remove sublime3 robo3t
pyfourmond's avatar
pyfourmond committed
420

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
421
## Documentation
pyfourmond's avatar
pyfourmond committed
422

423
This section describes how `liar` works, which commands options and parameters it accepts.
pyfourmond's avatar
pyfourmond committed
424

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
425
### Commands
pyfourmond's avatar
pyfourmond committed
426

427
`liar` supports the following commands:
428 429 430 431 432 433

- help
- install
- list
- remove
- version
434
- upgrade
435 436 437 438 439 440

used to:

- Getting help
- Install a software
- List installed software
441
- Remove one or several softwares
442
- Getting `liar` version
443
- Upgrade `liar` (development version only)
444

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
445
#### help
446

447
To get help of `liar` usage, simply enter:
448 449

    $ liar help
450 451 452 453 454 455 456
       Usage: liar [OPTIONS...] COMMAND [PARAMETERS...]

              Handles installation, removal and listing of software packaged in an archive.
              Supported archive types are: .tar .tar.bz2 .tar.gz .tar.xz .tar.Z .tbz2 .tgz .zip

              OPTIONS:
                        -d      Specify DESTINATION folder. If unspecified, installation will be done in /home/user/Programs.
457
                        -l      Create symbolic links in /home/user/bin folder after installation.
458
                        -s      Specify the folder for SYMBOLIC links creation.
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
459
                        -p      Specify the file PATTERN(s) to restrict symbolic links creation.
460
                        -a      Specify the download user AGENT: wget, curl or aria2c. By default, wget is used.
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
461
                        -n      Use content disposition header.
462 463
                        -c      Specify the file path expected CHECKSUM.
                        -t      Specify the checksum TYPE: md5, sha1, sha256 or sha512. By default sha1 is used.
464
                        -S      Specify the sort COLUMN to use in list command.
465 466
                        -v      Activate VERBOSE mode.
                        -r      Allow ROOT usage.
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
467 468
                        -b      Bypass CACHE use for local archives.
                        -f      Bypass user CONFIRMATION.
469

470
              COMMANDS:
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
471
                        help                        Display this help.
472
                        install NAME FILE_PATH      Install a software packaged in the archive FILE_PATH into the folder DESTINATION under the name NAME.
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
473
                        list                        List installed software.
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
474
                        remove NAMES...             Remove the software(s) named NAMES.
475
                        upgrade                     Upgrade liar.
476
                        version                     Print the version of liar.
477

478 479 480 481 482
With `-v` option, `liar` help output also includes sample commands:

    $ liar -v help

    ...
483
              EXAMPLES:
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
484
                        liar install sublime Downloads/sublime_text_3_build_3126_x64.tar.bz2
485 486 487 488
                        liar install maven http://apache.crihan.fr/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz
                        liar -l -p "sublime*" install sublime Downloads/sublime_text_3_build_3126_x64.tar.bz2
                        liar -v -l install jre Downloads/jre-8u121-linux-x64.tar.gz
                        liar -v -a curl -l -p pycharm.sh install pycharm https://download-cf.jetbrains.com/python/pycharm-community-2017.1.tar.gz
489
                        liar remove sublime
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
490 491
                        liar -S 4 list
                        liar -v -S -5 list
492
                        liar -r -d /opt/liar-installations list
493

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
494
#### install
495

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
496
In its simplest form, the install command takes only two parameters.
497 498 499 500

For example:

    $ liar install jdk8 ~/Downloads/jdk-8u101-linux-x64.tar.gz
501
    Installing 'jdk8' from '/home/user/Downloads/jdk-8u101-linux-x64.tar.gz' to '/home/user/Programs/jdk8'
502
    Extracting '/home/user/.liar_cache/jdk-8u101-linux-x64.tar.gz' to '/home/user/Programs/jdk8'
503 504 505

The parameters are:

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
506
- the name to give to the software being installed
507 508
- the input archive containing the software

509
Additionnaly, ALL `liar` options can be used to alter the install command behavior.
510

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
511
See [Options and parameters](#options-and-parameters) section for more details.
512

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
513
#### list
514

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
515
The list command displays which software are installed in the DESTINATION folder:
516 517 518

    $ liar list
    Listing installed software in '/home/user/Programs'
519

520
    Name           Folder             File Path                              Date        Time
521

522
    torbrowser     tor-browser_fr     tor-browser-linux64-6.5_fr.tar.xz      2017/01/30  09:42:33
523
    maven          apache-maven-3.3   apache-maven-3.3.9-bin.tar.gz          2017/03/26  08:17:52
524 525
    jdk8           jdk1.8.0_111       jdk-8u111-linux-x64.tar.gz             2017/01/26  08:54:05
    sublime        sublime_text_3     sublime_text_3_build_3126_x64.tar.bz   2016/12/20  11:55:32
526 527 528 529 530 531 532 533

When using verbose mode, more info is displayed:

    $ liar -v list
    Enabling verbose mode
    DESTINATION option is not set, Using '/home/user/Programs' by default
    Listing installed software in '/home/user/Programs'

534
    Name           Folder             File Path                              Sha1       Date        Time       Links
535

536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564
    torbrowser     tor-browser_fr     tor-browser-linux64-6.5_fr.tar.xz      1f8b211e   2017/01/30  09:42:33   1
    jdk8           jdk1.8.0_111       jdk-8u111-linux-x64.tar.gz             b6432ce4   2017/01/26  08:54:05   58
    sublime        sublime_text_3     sublime_text_3_build_3126_x64.tar.bz   dd95e628   2016/12/20  11:55:32   0

By default, the list command output is ordered by last installation date.

To sort the output using another column, `-S` option may be used. For example, to sort according to the name:

    $ liar -S1 list
    Setting sort column to: 1
    Setting sort order to: 'normal'
    Listing installed software in '/home/user/Programs'

    Name           Folder             File Name                              Date

    atom           atom-beta-1.14.0   atom-amd64.tar.gz                      2017/03/29
    firefox_quan   firefox            firefox-57.0.tar.bz2                   2017/11/18
    gradle         gradle-4.2.1       gradle-4.2.1-bin.zip                   2017/10/15
    hugo           hugo               hugo_0.31.1_Linux-64bit.tar.gz         2017/12/09
    idea-communi   idea-IC-181.4668   ideaIC-2018.1.2.tar.gz                 2018/05/06
    maven          apache-maven-3.3   apache-maven-3.3.9-bin.tar.gz          2017/03/26
    pycharm        pycharm-communit   pycharm-community-2017.1.tar.gz        2017/03/27
    quantum_node   firefox            firefox-57.0.2.tar.bz2                 2017/12/17
    rubymine       RubyMine-2017.2.   RubyMine-2017.2.4.tar.gz               2017/10/15
    torbrowser     tor-browser_fr     tor-browser-linux64-7.5.3_fr.tar.xz    2018/05/07
    umongo         umongo-linux-all   umongo-linux-all_1-6-1.zip             2017/03/29
    webstorm       WebStorm-172.415   WebStorm-2017.2.4.tar.gz               2017/10/15

A negative value supplied to `-S` option will reverse the sort.
565

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
566
#### remove
567

568
The remove command takes an unique parameter, the name of the software to remove, which is the one that was given when installing.
569

570 571
A remove sample use is:

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
572 573 574
    $ liar remove maven3
    Removing 'maven3' installed in '/home/user/Programs/maven3'
    Do you want to remove 'maven3' installed in '/home/user/Programs/maven3' (Y/N) ? Y
575

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
576 577 578 579 580
When removing a software, a confirmation is asked to the user. This confirmation can be removed if `-f` option is used:

    $ liar -f remove maven3
    Enabling force mode
    Removing 'maven3' installed in '/home/user/Programs/maven3'
581 582 583

The remove command can be used with the general options described below.

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
584
#### upgrade
585 586 587

The upgrade command is for development purposes and can only be used when you have installed the current developement version.

588 589 590 591 592 593 594
This command allows to upgrade liar with the latest development version available.

When `liar` has been installed with root:

    $ sudo liar -r upgrade

For non-root installations:
595 596 597

    $ liar upgrade

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
598 599
The upgrade command prompts the user for confirmation. If you want to bypass confirmation, simply add `-f` flag to the previous commands.

600 601 602 603 604 605 606
#### version

To display the version of `liar` being used, enter:

    $ liar version
    liar version 0.1

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
607
### Options and parameters
608

609
Now that we have seen which commands `liar` implements, let's see the options they can use, and the parameters they need.
610 611

General options are:
pyfourmond's avatar
pyfourmond committed
612 613

- DESTINATION folder
614
- VERBOSE mode
pyfourmond's avatar
pyfourmond committed
615
- ROOT usage
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
616 617
- Bypass CACHE
- Bypass user CONFIRMATION
618
- Download user AGENT
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
619
- Content disposition header
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
620
- CHECKSUM type and value
pyfourmond's avatar
pyfourmond committed
621

622 623 624
Symbolic links creation options are:

- folder for SYMBOLIC links creation
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
625
- file PATTERN(s) for SYMBOLIC links
626 627

Command parameters are:
pyfourmond's avatar
pyfourmond committed
628 629 630 631

- software NAME
- archive FILE_PATH

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
632
#### Destination folder
pyfourmond's avatar
pyfourmond committed
633

634
`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.
pyfourmond's avatar
pyfourmond committed
635

pyfourmond's avatar
pyfourmond committed
636
DESTINATION folder default value is: `$HOME/Programs`.
pyfourmond's avatar
pyfourmond committed
637

638 639
This option can be used with install, list and remove commands.

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
640
#### Name
pyfourmond's avatar
pyfourmond committed
641

642
When installing a software `liar` needs two mandatory parameters, the NAME and the FILE_PATH.
pyfourmond's avatar
pyfourmond committed
643

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
644
NAME is used to create a sub-folder in the DESTINATION folder in order to install the desired software.
pyfourmond's avatar
pyfourmond committed
645

646
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.
pyfourmond's avatar
pyfourmond committed
647

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
648
#### File path
pyfourmond's avatar
pyfourmond committed
649 650

FILE_PATH is the path of the archive containing the software to install.
pyfourmond's avatar
pyfourmond committed
651

652 653
The FILE_PATH parameter is specific to the install command.

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
654
#### Symbolic links creation
pyfourmond's avatar
pyfourmond committed
655

656
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.
pyfourmond's avatar
pyfourmond committed
657

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
658
Symlinking can be done for all or only some of the executables installed.
659

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
660 661 662 663 664
In this case the file PATTERN(s) used to filter the executables to symlink is(are) a(some) pattern(s) understood by the **find** command **-wholename** flag.

Multiple patterns should be separated by `|`.

For convenience, an initial `*` is added to the beginning of each pattern if not already present.
pyfourmond's avatar
pyfourmond committed
665

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
666
The folder for SYMBOLIC links creation is optional and has the following default values:
pyfourmond's avatar
pyfourmond committed
667

pyfourmond's avatar
pyfourmond committed
668 669
- `/usr/local/bin` for root installation
- `$HOME/bin` otherwise
pyfourmond's avatar
pyfourmond committed
670

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
671
#### Verbose mode
672

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
673
When option `-v` is set, verbose mode is activated. In this mode, some commands display more detailed output when executed.
674

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
675
#### Root usage
pyfourmond's avatar
pyfourmond committed
676

677
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.
pyfourmond's avatar
pyfourmond committed
678

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
679
#### Bypass cache
680

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
681 682
`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.

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
683
#### Bypass user confirmation
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
684

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
685
When removing one or several softwares, or when using the command upgrade, a confirmation is asked to the user to prevent unwanted removal. To skip this confirmation, `-f` option may be used.
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
686

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
687
#### Download user agent
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
688 689

When installing an archive that is downloaded from the internet, the default user agent is `wget`.
690 691 692

It is possible to change this behavior using `-a` flag with one of the following values:

693
- aria2c
694 695 696
- curl
- wget

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
697 698 699 700
#### Content disposition header

Some software providers supply their URL in the form of https://dl.pstmn.io/download/latest/linux64 making use of the content disposition header. In this case, the `-n` flag should be used to get the effective file name.

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
701
#### Checksum type and value
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
702 703 704 705 706 707 708 709 710

`liar` supports checksum verification for downloaded file path.

To set the checksum of the file to install, use the `-c` option followed by the SHA1 checksum. If the checksum is not a SHA1 but a MD5, SHA256 or SHA512, you can set the checksum type using the `-t` flag.

For example:

    $ liar -t sha256 -c a5a4f948d259734ac5649122d0c2f7e885b48162cde78e43415638cbfd7a7aa3 install idea_community https://download-cf.jetbrains.com/idea/ideaIC-2018.1.1.tar.gz

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
711
### Configuration files
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
712 713 714 715 716 717 718

`liar` uses two configuration files located in `$HOME`.

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`.

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
719
#### .liar_mime_types
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
720

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
721
When creating [symbolic links](#symbolic-links-creation), this file is used to determine whether a file is an executable or not.
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
722 723 724 725 726 727 728 729 730 731 732 733 734 735 736

`.liar_mime_types` looks like:

```
# Updated by liar at mardi 17 juillet 2018, 20:28:59 (UTC+0200)
application/x-executable
application/x-perl
application/x-sh
application/x-shellscript
application/x-tcl
text/x-perl
text/x-python
text/x-sh
```

737 738
It is customisable by the user.

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
739
#### .liar_software
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
740

741
This file describes which software `liar` can install, in which version and where to download their archives. It is used by [command line completion](#bash-completion-installation).
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
742

743
It is automatically upgraded at `bash` startup when it is outdated and can be upgraded manually witn the [upgrade](#upgrade) command.
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
744

745
`.liar_software` can also be customised by the user. In this case, upgrade of the file should be disabled as follows:
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
746

747
    $ export LIAR_SOFTWARE_FILE=custom
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
748

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
749
## Dependencies
pyfourmond's avatar
pyfourmond committed
750

751
`liar` requires nothing more than a Bourne Shell i.e. **sh** or compatible one with the following packages installed:
pyfourmond's avatar
pyfourmond committed
752

753 754 755 756 757 758
- **coreutils**
- **debianutils**
- **diffutils**
- **findutils**
- **mawk**
- **tar**
759

760
Additionally, the following packages providing compression programs are required depending of the archive format used:
761

762
- **bzip2**: .tar.bz2 .tbz2
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
763 764
- **gzip**: .tar.gz .tgz
- **ncompress**: .tar.Z
765
- **unzip**: .zip
766
- **xz-utils**: .tar.xz
767

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
768
Moreover, **aria2**, **curl** or **wget** package is needed when using archive download feature.
769

770 771 772
If installed, **xdg-utils** package will be used to filter executables when creating links.

Finally, **bash-completion** is required when using Bash command line completion.
pyfourmond's avatar
pyfourmond committed
773

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
774
## Tested software
775 776 777 778 779 780

`liar` has been tested with the following softwares:

- Apache Ant
- Apache Maven
- Atom
781
- Go
782
- GraalVM
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
783
- Gradle
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
784
- Groovy
785
- Hugo
786
- Icecat
787
- JDK General Availability Releases
788
- JDK Reference Implementations
789
- JetBrains IDE (GoLand, IntelliJ IDEA, PyCharm, RubyMine, WebStorm, ...)
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
790
- Marp CLI
791
- Mozilla Firefox
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
792
- Postman
793
- Robo 3T (Formerly RoboMongo)
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
794
- Scala and sbt
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
795
- Sublime Merge
796 797
- Sublime Text
- Tor Browser
798
- VisualVM
799
- xsv
800

801 802 803 804
Postman needs to be installed with the `-n` flag if automatic URL completion is used.

## Formerly tested software

805
Asciinema is no longer tested as it is not delivered anymore as an [archive](https://discourse.asciinema.org/t/changes-in-asciinema-packaging/90).
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
806

807
Eclipse is no longer tested as it is now delivered as an installer instead of an archive.
808

809
NetBeans is no longer tested as the URL to download a specific version changes too often for nothing.
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
810

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
811
## Docker image
812

813
`liar` [docker image](https://hub.docker.com/r/grumpyf0x48/liar) is based on Debian Buster and has the latest development version of liar installed with Bash command line completion.
814 815 816 817 818

To use it:

    $ docker run -it grumpyf0x48/liar

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
819 820 821 822 823 824 825 826 827
## Similar software

`liar` provides similar features as the following softwares:

- [Linuxbrew](https://linuxbrew.sh/)
- [SDKMAN](https://sdkman.io/)

However, they do not work exactly the same way.

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
828
## License
pyfourmond's avatar
pyfourmond committed
829

830 831
Copyright (C) 2017 Pierre-Yves Fourmond.

832
`liar` is free software, distributed under the terms of the [GNU](https://www.gnu.org) General Public License as published by the [Free Software Foundation](https://www.fsf.org), version 3 of the License (or any later version). For more information, see the file [LICENSE](LICENSE.md).
pyfourmond's avatar
pyfourmond committed
833

834
Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty.
835

836
<a href="https://www.gnu.org/licenses/gpl-3.0.en.html" title="General Public License" target="_blank"><img src="https://www.gnu.org/graphics/gplv3-with-text-84x42.png" /></a>