-
-
Notifications
You must be signed in to change notification settings - Fork 43
Home
Welcome to the AM-application-manager wiki!
Here I will try to explain the installation script's workflow for a program to be better managed by "AM", trying to use a language that is as simple and elementary as possible.
Each script is written exclusively for "AM" (and is structured in such a way that even "AppMan", the non-root version of "AM", can modify it to manage programs locally).
We can divide the stages of an installation's process as follows:
- Creating the main folder of the program in /opt, as already suggested by the Linux Standard Base (LSB);
- Creating a script named "remove", needed to uninstall averything (this must be the first one to be created, in order to quickly resolve any aborted/brocken installations using the
-r
option); - Download and/or compile the program (this operation varies depending on how the program is distributed);
- Creating a link in
$PATH
(usually/usr/local/bin
, but also/usr/bin
,/usr/games
or/usr/local/games
); - Creating a script named "AM-updater", which is a kind of "copy" of step "4" (see above) that may include options to recognize newer versions of the program. NOTE that if you intend to create a script for the fixed version of a program, you can also skip this step;
- Create a launcher and download an icon. Note that if you intend to create a script for a command line utility, you can also skip this step;
- Change the permissions in the program folder, so you can use the update function (step 5) without using "sudo" privileges.
The most difficult step to overcome is certainly the number "4", given the great variety of methods in which authors distribute their software, while all the other steps are much easier to overcome.
Some "templates" are already available here or by downloading them using the -t
option, this way:
am -t $PROGRAM
Where $PROGRAM is the name of the program you want to create a script for. The command will generate a script named $PROGRAM.AM (I wrote the availability of a ".AM" extension to prevent overwriting of files on your desktop with the same name of the script you want write, you can safelly remove it).
If you open the script, you can read some uppercased parts that you must replace manually (ICON, LAUNCHER, URL...).
Keep reading to understand how each script works and how you can write one from scratch.
You can use the index here, on the side, to navigate all pages of this wiki.
Enjoy the reading!