README.md 40.7 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
Here, we specify the relevant pattern so as to create a symbolic link for each binary in `$JAVA_HOME/bin`:
169

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

229
### Installing Sublime Text from the HTTP URL
230

231 232
    $ 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'
233
    2019-12-28 09:58:11 URL:http://download.sublimetext.com/sublime_text_3_build_3126_x64.tar.bz2 [9313954/9313954] -> "/home/debian/.liar_cache/sublime_text_3_build_3126_x64.tar.bz2" [1]
234 235
    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
236
### Installing Robomongo with symbolic links created
237 238 239 240 241

    $ 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'
242

243
With this 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
244

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
245
### Installing Maven
246

247 248 249 250 251 252
    $ 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'
253

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
254
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
255 256

To restrict which files are symlinked:
257

258 259 260 261
    $ 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'
262

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

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

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
267
    $ liar -v -l -p idea.sh install idea-community https://download.jetbrains.com/idea/ideaIC-2017.1.tar.gz
268
    Enabling verbose mode
269
    DESTINATION option is not set, Using '/home/debian/Programs' by default
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
270 271 272
    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
273 274 275
    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
276 277
    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
278 279 280
    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
281 282
    Taille : 427717734 (408M) [binary/octet-stream]
    Sauvegarde en : « /home/debian/.liar_cache/ideaIC-2017.1.tar.gz »
283 284 285

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

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

    Creating '/home/debian/Programs/idea-community'
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
289 290
    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'
291
    Creating link: '/home/debian/bin/idea.sh'
292 293 294

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
295
### Installing IntelliJ IDEA with checksum verification
296 297 298 299 300 301 302 303 304 305 306 307

    $ 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
308
### Installing Tor Browser
pyfourmond's avatar
pyfourmond committed
309

310 311 312 313
    $ 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
314

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

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
317
### Installing Gradle
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
318 319 320 321 322 323 324 325 326 327 328

    $ 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
329
### Installing Go
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
330 331 332 333 334 335 336

    $ 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
337
### Installing GoLand
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
338 339 340

    $ 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
341
    Setting BIN_PATTERNS to 'goland.sh'
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360
    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
361 362
### Installing Postman

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
363
    $ liar -e -l -p Postman install postman https://dl.pstmn.io/download/latest/linux64
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
364 365 366 367 368 369
    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'

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
370
Postman supplied URL makes uses of the content-disposition header, that's why we need to use the `-e` flag here.
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
371

372 373 374
### Installing Spring Boot CLI

    $ liar -l install spring https://repo.spring.io/release/org/springframework/boot/spring-boot-cli/2.2.2.RELEASE/spring-boot-cli-2.2.2.RELEASE-bin.tar.gz
375 376 377
    Installing 'spring' from 'https://repo.spring.io/release/org/springframework/boot/spring-boot-cli/2.2.2.RELEASE/spring-boot-cli-2.2.2.RELEASE-bin.tar.gz' to '/home/debian/Programs/spring'
    2019-12-28 09:39:28 URL:https://repo.spring.io/release/org/springframework/boot/spring-boot-cli/2.2.2.RELEASE/spring-boot-cli-2.2.2.RELEASE-bin.tar.gz [11369462/11369462] -> "/home/debian/.liar_cache/spring-boot-cli-2.2.2.RELEASE-bin.tar.gz" [1]
    Extracting '/home/debian/.liar_cache/spring-boot-cli-2.2.2.RELEASE-bin.tar.gz' to '/home/debian/Programs/spring'
378 379
    Creating link: '/home/debian/bin/spring'

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
380
### Installing a software while being root
381

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

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

387
Then when adding `-r` option:
388

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

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
394
### List what you have installed
395 396

    $ liar list
397
    Listing installed software in '/home/debian/Programs'
398

399
    Name           Folder             File Path                              Date        Time
400

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

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

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
407
### Removing previously installed software
408

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
409 410 411
    $ 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
412

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
413
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
414 415 416 417

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

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

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
419
## Documentation
pyfourmond's avatar
pyfourmond committed
420

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

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
423
### Commands
pyfourmond's avatar
pyfourmond committed
424

425
`liar` supports the following commands:
426 427 428 429 430 431

- help
- install
- list
- remove
- version
432
- upgrade
433 434 435 436 437 438

used to:

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

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
443
#### help
444

445
To get help of `liar` usage, simply enter:
446 447

    $ liar help
448 449 450 451 452 453 454
       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.
455
                        -l      Create symbolic links in /home/user/bin folder after installation.
456
                        -s      Specify the folder for SYMBOLIC links creation.
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
457
                        -p      Specify the file PATTERN(s) to restrict symbolic links creation.
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
458
                        -n      Use -name find flag instead of default -wholename flag for executables search.
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
459
                        -u      Specify the download user AGENT: wget, curl or aria2c. By default, wget is used.
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
460
                        -e      Use content disposition header.
461 462
                        -c      Specify the file path expected CHECKSUM.
                        -t      Specify the checksum TYPE: md5, sha1, sha256 or sha512. By default sha1 is used.
463
                        -S      Specify the sort COLUMN to use in list command.
464 465
                        -v      Activate VERBOSE mode.
                        -r      Allow ROOT usage.
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
466 467
                        -b      Bypass CACHE use for local archives.
                        -f      Bypass user CONFIRMATION.
468

469
              COMMANDS:
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
470
                        help                        Display this help.
471
                        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
472
                        list                        List installed software.
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
473
                        remove NAMES...             Remove the software(s) named NAMES.
474
                        upgrade                     Upgrade liar.
475
                        version                     Print the version of liar.
476

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

    $ liar -v help

    ...
482
              EXAMPLES:
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
483
                        liar install sublime Downloads/sublime_text_3_build_3126_x64.tar.bz2
484 485 486
                        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
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
487
                        liar -v -u curl -l -p pycharm.sh install pycharm https://download-cf.jetbrains.com/python/pycharm-community-2017.1.tar.gz
488
                        liar remove sublime
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
489 490
                        liar -S 4 list
                        liar -v -S -5 list
491
                        liar -r -d /opt/liar-installations list
492

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

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

For example:

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

The parameters are:

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

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

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

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

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

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

519
    Name           Folder             File Path                              Date        Time
520

521
    torbrowser     tor-browser_fr     tor-browser-linux64-6.5_fr.tar.xz      2017/01/30  09:42:33
522
    maven          apache-maven-3.3   apache-maven-3.3.9-bin.tar.gz          2017/03/26  08:17:52
523 524
    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
525 526 527 528 529 530 531 532

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'

533
    Name           Folder             File Path                              Sha1       Date        Time       Links
534

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

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

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

569 570
A remove sample use is:

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
571 572 573
    $ 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
574

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
575 576 577 578 579
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'
580 581 582

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

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

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

587 588 589 590 591 592 593
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:
594 595 596

    $ liar upgrade

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

599 600 601 602 603 604 605
#### 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
606
### Options and parameters
607

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

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

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

621 622 623
Symbolic links creation options are:

- folder for SYMBOLIC links creation
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
624
- file PATTERN(s) for SYMBOLIC links
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
625
- find TYPE for executables search
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
#### Verbose mode
655

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

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
658
#### Root usage
pyfourmond's avatar
pyfourmond committed
659

660
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
661

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
662
#### Bypass cache
663

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
664 665
`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
666
#### Bypass user confirmation
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
667

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
668
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
669

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
670
#### Download user agent
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
671 672

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

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
674
It is possible to change this behavior using `-u` flag with one of the following values:
675

676
- aria2c
677 678 679
- curl
- wget

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
680 681
#### Content disposition header

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
682
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 `-e` flag should be used to get the effective file name.
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
683

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
684
#### Checksum type and value
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
685 686 687 688 689 690 691 692 693

`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
694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712
#### 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.

Symlinking can be done for all or only some of the executables installed.

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 (by default).

If `-n` flag is used, the **find** command **-name** flag is used instead.

Multiple patterns should be separated by `|`.

For convenience, an initial `*` is added to the beginning of each pattern if not already present.

The folder for SYMBOLIC links creation is optional and has the following default values:

- `/usr/local/bin` for root installation
- `$HOME/bin` otherwise

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

`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
721
#### .liar_mime_types
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
722

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
723
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
724 725 726 727 728 729 730 731 732 733 734 735 736 737 738

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

739 740
It is customisable by the user.

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
741
#### .liar_software
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
742

743
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
744

745
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
746

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

749
    $ export LIAR_SOFTWARE_FILE=custom
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
750

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
751
## Dependencies
pyfourmond's avatar
pyfourmond committed
752

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

755 756 757 758 759 760
- **coreutils**
- **debianutils**
- **diffutils**
- **findutils**
- **mawk**
- **tar**
761

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

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

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

772 773 774
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
775

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

`liar` has been tested with the following softwares:

- Apache Ant
- Apache Maven
- Atom
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
783
- Evans
784
- Go
785
- GraalVM
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
786
- Gradle
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
787
- Groovy
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
788
- gRPCurl
789
- Hugo
790
- Icecat
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
791
- JDK Early Access Releases
792
- JDK General Availability Releases
793
- JDK Reference Implementations
794
- JetBrains IDE (GoLand, IntelliJ IDEA, PyCharm, RubyMine, WebStorm, ...)
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
795
- Marp CLI
796
- Mozilla Firefox
797
- Node.js
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
798
- Postman
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
799
- Robo 3T
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
800
- Scala and sbt
801
- Spring Boot CLI
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
802
- Sublime Merge
803 804
- Sublime Text
- Tor Browser
805
- VisualVM
806
- xsv
807

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
808
Postman needs to be installed with the `-e` flag if automatic URL completion is used.
809 810 811

## Formerly tested software

812
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
813

814
Eclipse is no longer tested as it is now delivered as an installer instead of an archive.
815

816
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
817

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
818
## Docker image
819

820
`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.
821 822 823 824 825

To use it:

    $ docker run -it grumpyf0x48/liar

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
826 827 828 829 830 831 832 833 834
## 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
835
## License
pyfourmond's avatar
pyfourmond committed
836

837 838
Copyright (C) 2017 Pierre-Yves Fourmond.

839
`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
840

841
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.
842

843
<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>