README.md 42.5 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
37
- Possibility to download and cache an archive before its installation
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
38
- Internal software archives cache, optional for local archives
39
- Download user agent choice (wget, curl or aria2c) for network archives
40
- Download resume (network archives)
41
- Secure installation to prevent software duplicates in a given destination folder
42
- Integrity for non `liar` installed software or unknown folder as `liar` does not remove nor list software it has not installed itself
43 44
- Secure software removal guaranteed by interactive user confirmation
- Optional root usage
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
45
- Symbolic links creation for installed binaries with folder selection and binaries filtering
46
- Bash command line completion to help entry of options, commands and parameters
47

48
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
49

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

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

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

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

58
<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>
59

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

62
Otherwise, go on with the development version.
63

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

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

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

70 71 72
#### New features

- Software archive checksum verification (md5, sha1, sha256 or sha512)
73 74
- Improvements for binaries filtering in symbolic links creation
- Simplified usage with samples only displayed in verbose mode
75 76
- Automatic completion of software names and urls for more than 20 tested software (for x86_64 architecture)
- Remove command is now able to remove several software at a time
77 78 79 80
- 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
81
- Possibility to download and cache an archive before its installation
82

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
83
### Basic installation
84

85 86 87 88 89 90 91 92 93 94
    $ 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
95
### Bash completion installation
96

97 98 99
`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:
100

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

Alternatively you can also use wget:

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

107 108
Then, start a new Bash interpreter.

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
109
### Released version installation
110

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
111
### Basic installation
112 113

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

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

117
Or you can use wget instead:
118

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

Then:

123
    $ sudo chmod 755 /usr/local/bin/liar
pyfourmond's avatar
pyfourmond committed
124

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
125
### All-in-one command installation
126

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

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

Or:

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

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
135
### Installation without sysadmin rights
136 137

Without sysadmin rights, use the following command:
138

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

Or:

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

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
145
### Bash completion installation
146

147
To install Bash command line completion, enter the following command:
148

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

Alternatively you can also use wget:

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

Then, start a new Bash interpreter.

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
157
## Sample use
pyfourmond's avatar
pyfourmond committed
158

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

161 162 163 164
    $ 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
165

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
166
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
167

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

170
Here, we specify the relevant pattern so as to create a symbolic link for each binary in `$JAVA_HOME/bin`:
171

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
172
    $ liar -v -l -p "bin/*" install jdk_ri8 openjdk-8u40-b25-linux-x64-10_feb_2015.tar.gz
173
    Enabling verbose mode
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
174
    Setting BIN_PATTERNS to 'bin/*'
175
    DESTINATION option is not set, Using '/home/debian/Programs' by default
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
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 220 221
    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'
222

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

225 226 227
    $ 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
228

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

231
### Installing Sublime Text from the HTTP URL
232

233 234
    $ 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'
235
    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]
236 237
    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
238
### Installing Robomongo with symbolic links created
239 240 241 242 243

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

245
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
246

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
247
### Installing Maven
248

249 250 251 252 253 254
    $ 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'
255

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

To restrict which files are symlinked:
259

260 261 262 263
    $ 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'
264

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

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

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

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

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

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

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

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

312 313 314 315
    $ 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
316

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

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

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

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

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

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

374 375 376
### 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
377 378 379
    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'
380 381
    Creating link: '/home/debian/bin/spring'

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

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

used to:

- Getting help
- Install a software
- List installed software
441
- Remove one or several software
442
- Upgrade `liar` (development version only)
443 444 445 446 447 448 449 450 451 452 453
- Getting `liar` version

Additionally, the following commands act on the local archive cache:

- download
- display

to respectively:

- Download a software
- Display the cached archives or the content of a cached archive
454

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
455
#### help
456

457
To get help of `liar` usage, simply enter:
458 459

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

481 482 483 484 485 486 487 488 489 490 491
               COMMANDS:
                         help                        Display this help.
                         install NAME FILE_PATH      Install a software packaged in the archive FILE_PATH into the folder DESTINATION under the name NAME.
                         list                        List installed software.
                         remove NAMES...             Remove the software(s) named NAMES.
                         upgrade                     Upgrade $LIAR.
                         version                     Print the version of $LIAR.

               CACHE COMMANDS:
                         download NAME FILE_PATH     Download or cache the software named NAME from the archive FILE_PATH.
                         display [FILE_PATH]         Display the cached archives or the content of the cached archive FILE_PATH.
492

493 494 495 496 497
With `-v` option, `liar` help output also includes sample commands:

    $ liar -v help

    ...
498
              EXAMPLES:
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
499
                        liar install sublime Downloads/sublime_text_3_build_3126_x64.tar.bz2
500 501 502
                        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
503
                        liar -v -u curl -l -p pycharm.sh install pycharm https://download-cf.jetbrains.com/python/pycharm-community-2017.1.tar.gz
504
                        liar remove sublime
505
                        liar download sublimemerge https://download.sublimetext.com/sublime_merge_build_1119_x64.tar.xz
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
506 507
                        liar -S 4 list
                        liar -v -S -5 list
508
                        liar -r -d /opt/liar-installations list
509

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
510
#### install
511

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
512
In its simplest form, the install command takes only two parameters.
513 514 515 516

For example:

    $ liar install jdk8 ~/Downloads/jdk-8u101-linux-x64.tar.gz
517
    Installing 'jdk8' from '/home/user/Downloads/jdk-8u101-linux-x64.tar.gz' to '/home/user/Programs/jdk8'
518
    Extracting '/home/user/.liar_cache/jdk-8u101-linux-x64.tar.gz' to '/home/user/Programs/jdk8'
519 520 521

The parameters are:

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
522
- the name to give to the software being installed
523 524
- the input archive containing the software

525
Additionally, all `liar` options except `-f` can be used to alter the install command behavior.
526

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

529 530 531 532 533 534 535 536
#### download

The download command takes the same parameters as the install one but only downloads the archive to the cache without installing it.

For example:

    $ liar download sublimemerge https://download.sublimetext.com/sublime_merge_build_1119_x64.tar.xz

537
Once the archive has been downloaded it can be installed later on with slightly the same command line:
538 539 540

    $ liar install sublimemerge https://download.sublimetext.com/sublime_merge_build_1119_x64.tar.xz

541 542
Having replaced `download` by `install`.

543 544
The cached archive will then be used during the installation.

545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561
If the last argument to the download command is a local file, then this file will be cached.

**Note:** The software name used by the `download` command is only used to allow bash completion of the software URL.

#### display

The display content can display either all cached archives:

    $ liar display

In this case, all archives found in `~/.liar_cache` folder are listed.

or the content of a given archive:

    $ liar display micronaut-1.1.0.zip

which lists the content of the chosen archive.
562

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
563
#### list
564

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
565
The list command displays which software are installed in the DESTINATION folder:
566 567 568

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

570
    Name           Folder             File Path                              Date        Time
571

572
    torbrowser     tor-browser_fr     tor-browser-linux64-6.5_fr.tar.xz      2017/01/30  09:42:33
573
    maven          apache-maven-3.3   apache-maven-3.3.9-bin.tar.gz          2017/03/26  08:17:52
574 575
    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
576 577 578 579 580 581 582 583

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'

584
    Name           Folder             File Path                              Sha1       Date        Time       Links
585

586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614
    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.
615

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
616
#### remove
617

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

620 621
A remove sample use is:

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
622 623 624
    $ 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
625

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
626 627 628 629 630
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'
631 632 633

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

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
634
#### upgrade
635 636 637

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

638 639 640 641 642 643 644
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:
645 646 647

    $ liar upgrade

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

650 651 652 653 654 655 656
#### 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
657
### Options and parameters
658

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

General options are:
pyfourmond's avatar
pyfourmond committed
662 663

- DESTINATION folder
664
- VERBOSE mode
pyfourmond's avatar
pyfourmond committed
665
- ROOT usage
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
666 667
- Bypass CACHE
- Bypass user CONFIRMATION
668
- Download user AGENT
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
669
- Content disposition header
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
670
- CHECKSUM type and value
pyfourmond's avatar
pyfourmond committed
671

672 673 674
Symbolic links creation options are:

- folder for SYMBOLIC links creation
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
675
- file PATTERN(s) for SYMBOLIC links
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
676
- find TYPE for executables search
677 678

Command parameters are:
pyfourmond's avatar
pyfourmond committed
679 680 681 682

- software NAME
- archive FILE_PATH

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
683
#### Destination folder
pyfourmond's avatar
pyfourmond committed
684

685
`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
686

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

689 690
This option can be used with install, list and remove commands.

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
691
#### Name
pyfourmond's avatar
pyfourmond committed
692

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

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

697
The NAME parameter is also mandatory when removing a software. Several NAME parameters may also be supplied to the remove command when removing several software at a time.
pyfourmond's avatar
pyfourmond committed
698

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
699
#### File path
pyfourmond's avatar
pyfourmond committed
700 701

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

703 704
The FILE_PATH parameter is specific to the install command.

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
705
#### Verbose mode
706

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

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
709
#### Root usage
pyfourmond's avatar
pyfourmond committed
710

711
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
712

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
713
#### Bypass cache
714

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
715 716
`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
717
#### Bypass user confirmation
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
718

719
When removing one or several software, 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
720

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
721
#### Download user agent
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
722 723

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

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

727
- aria2c
728 729 730
- curl
- wget

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
731 732
#### Content disposition header

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
733
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
734

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
735
#### Checksum type and value
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
736 737 738 739 740 741 742 743 744

`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
745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763
#### 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
764
### Configuration files
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
765 766 767 768 769 770 771

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

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
774
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
775 776 777 778 779 780 781 782 783 784 785 786 787 788 789

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

790 791
It is customisable by the user.

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
792
#### .liar_software
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
793

794
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
795

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

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

800
    $ export LIAR_SOFTWARE_FILE=custom
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
801

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
802
## Dependencies
pyfourmond's avatar
pyfourmond committed
803

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

806 807 808 809 810 811
- **coreutils**
- **debianutils**
- **diffutils**
- **findutils**
- **mawk**
- **tar**
812

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

815
- **bzip2**: .tar.bz2 .tbz2
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
816 817
- **gzip**: .tar.gz .tgz
- **ncompress**: .tar.Z
818
- **unzip**: .zip
819
- **xz-utils**: .tar.xz
820

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

823 824 825
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
826

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
827
## Tested software
828

829
`liar` has been tested with the following software:
830 831 832 833

- Apache Ant
- Apache Maven
- Atom
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
834
- Evans
835
- Go
836
- GraalVM
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
837
- Gradle
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
838
- Groovy
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
839
- gRPCurl
840
- Hugo
841
- Icecat
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
842
- JDK Early Access Releases
843
- JDK General Availability Releases
844
- JDK Reference Implementations
845
- JetBrains IDE (GoLand, IntelliJ IDEA, PyCharm, RubyMine, WebStorm, ...)
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
846
- Marp CLI
847
- Mozilla Firefox
848
- Node.js
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
849
- Postman
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
850
- Robo 3T
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
851
- Scala and sbt
852
- Spring Boot CLI
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
853
- Sublime Merge
854 855
- Sublime Text
- Tor Browser
856
- VisualVM
857
- xsv
858

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
859
Postman needs to be installed with the `-e` flag if automatic URL completion is used.
860 861 862

## Formerly tested software

863
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
864

865
Eclipse is no longer tested as it is now delivered as an installer instead of an archive.
866

867
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
868

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
869
## Docker image
870

871
`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.
872 873 874 875 876

To use it:

    $ docker run -it grumpyf0x48/liar

Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
877 878
## Similar software

879
`liar` provides similar features as the following software:
Pierre-Yves Fourmond's avatar
Pierre-Yves Fourmond committed
880 881 882 883 884 885

- [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
886
## License
pyfourmond's avatar
pyfourmond committed
887

888 889
Copyright (C) 2017 Pierre-Yves Fourmond.

890
`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
891

892
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.
893

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