previous | next

How angels work

ANGELSCRiPTS manages angels. An angel is basically a help-file. ANGELSCRiPTS are organised hierarchically in folder/subfolder structure with directory $ANGELPATH on the top. A folder within the angel-directory is an angel, too, and can be accessed as such.

Invoking ANGEL-SCRiPTS will display the angel called: In case the angel is a folder the folder's content is displayed, in case the angel is a file, the angel's message (a text message). After that, the user is back at the console prompt.

The list shown in example 1 is the content of the angel base directory. It contains sub folders (in dark blue) and angels (in green). By simply typing the corresponding number and [enter] directly on the console, the chosen angel is displayed: Choosing a folder will move to the chosen subdirectory (and show the entries), choosing an angel will display the angel.

Example 1: Invoking angel base directory



Example 2: Choosing an entry from the list



To display an angel, simply type the corresponding number and [enter].

Example 3: Displaying an angel



The above example shows an angel that helps to change samba. The numbers here are not angels but angel-commands - or short a-commands. A-commands are one ore more commands for bash listed for execution. By typing the corresponding number and [enter] all the commands of an angel-command are executed.

The first a-command makes a backup of the samba configuration file. The second a-command opens the 'vi' editor and moves to the line with the definition for the workgroup. The third a-command checks the the samba configuration file and the fourth restarts the samba server.

Every a-command in the angel can directly be executed by typing the number in the console and [enter].

Example 4: Executing a command




The enumerated angel-command is executed by typing its number, in the above case, typing '1 [enter]'. As the command inside the a-command starts with 'sudo', it prompts for a password.

Each command listed is independent and can be executed by itself. You don't have to use command number 1 before using command number 2.

The command is executed 'as is'. There is no checking if a previous command has been executed (that is essential), nor is there checking if a command was executed successfully. 1

Multiple commands and shell scripts

A-commands can contain a single command or stretch over multiple lines.

Three commands are executed by typing: 4 [enter]; four commands are executed by typing 5 [enter].

An a-command can refer to a shell script or programs. In that way, entire scripts can be executed or programs can be started (see LANGUAGE OF ANGELS). Just let the angel-command point to the shell script or program to execute.

Example 5: some a-commands




1The command is sourced inside angelscript to be able to use variables defined by angelscripts for more complex procedures. See developer section