Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
LECABashLib
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
19
Issues
19
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LECASofts
LECABashLib
Commits
8164a5f4
Commit
8164a5f4
authored
6 years ago
by
Eric Coissac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add doc for the new signal module
parent
d355a78e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
16 deletions
+52
-16
README.md
README.md
+52
-16
No files found.
README.md
View file @
8164a5f4
...
...
@@ -8,10 +8,10 @@ sourced in your script or directly from the interactive shell if you want
to use the functionalities of the LECA Bash Library from your interactive
session.
For activating the
*LECA Bash Library*
you must source the
`
util
.sh`
bash script.
For activating the
*LECA Bash Library*
you must source the
`
lecabashlib
.sh`
bash script.
```
{shell}
> source $LECABASHHOME/
utils
.sh
> source $LECABASHHOME/
lecabashlib
.sh
```
once activated modules can be loaded using the
`include`
command.
...
...
@@ -31,6 +31,15 @@ reload several time the same module. To force the reloading of a module, use the
The module is reloaded with all its dependancies. A logging message advertise the
name of each reloaded module.
You can specify alternative place where to look for non standard modules by setting
the
`LECABASHLIB_PATH`
environment variable. If several paths have to be declared, you
must separate them using colon
```
{shell}
> export LECABASHLIB_PATH="/new/path/1:/new/path/2:${LECABASHLIB_PATH}"
```
----------------------------------------------------------
# Modules provided by the *LECA Bash Library*
...
...
@@ -44,6 +53,7 @@ name of each reloaded module.
-
**[logging](#logging)**
: adds functionnalities for managing log files and log levels
-
**[mutex](#mutex)**
: manages concurent access to resources through locks and semaphores
-
**[sets](#sets)**
: manages
*set*
of values
-
**[signal](#signal)**
: manages signal handler functions
-
**[stacks](#stacks)**
: manages
*stacks*
of values
-
**[tempdir](#tempdir)**
: manages the creation of temporary directories and their erasements
-
**[timeout](#timeout)**
: provides a function for limiting the maximum execution time of a command
...
...
@@ -58,7 +68,7 @@ name of each reloaded module.
### Activating the module
```
{shell}
> source $LECABASHHOME/
utils
.sh
> source $LECABASHHOME/
lecabashlib
.sh
> include atexit
```
...
...
@@ -87,7 +97,7 @@ empty one using a UNIX redirection.
### Activating the module
```
{shell}
> source $LECABASHHOME/
utils
.sh
> source $LECABASHHOME/
lecabashlib
.sh
> include clobber
```
...
...
@@ -177,7 +187,7 @@ Alias for the `popclobber` function. Using one of the both commands `popnoclobbe
### Activating the module
```
{shell}
> source $LECABASHHOME/
utils
.sh
> source $LECABASHHOME/
lecabashlib
.sh
> include download
```
...
...
@@ -232,7 +242,7 @@ exiting in error.
### Activating the module
```
{shell}
> source $LECABASHHOME/
utils
.sh
> source $LECABASHHOME/
lecabashlib
.sh
> include ifs
```
...
...
@@ -263,7 +273,7 @@ where LECA ressources are stored on the LUKE cluster.
### Activating the module
```
{shell}
> source $LECABASHHOME/
utils
.sh
> source $LECABASHHOME/
lecabashlib
.sh
> include lecaluke
```
...
...
@@ -307,7 +317,7 @@ Therefore only `WARNING` and `ERROR` messages will be actually logged.
### Activating the module
```
{shell}
> source $LECABASHHOME/
utils
.sh
> source $LECABASHHOME/
lecabashlib
.sh
> include logging
```
...
...
@@ -385,7 +395,7 @@ Closes the current logfile and redirect the logging to stderr.
### Activating the module
```
{shell}
> source $LECABASHHOME/
utils
.sh
> source $LECABASHHOME/
lecabashlib
.sh
> include mutex
```
...
...
@@ -437,7 +447,7 @@ Closes the current logfile and redirect the logging to stderr.
### Activating the module
```
{shell}
> source $LECABASHHOME/
utils
.sh
> source $LECABASHHOME/
lecabashlib
.sh
> include sets
```
...
...
@@ -486,6 +496,32 @@ Closes the current logfile and redirect the logging to stderr.
setintersec <SETNAME1> <SETNAME2> <DESTINATION>
```
----------------------------------------------------------
## signal
### Activating the module
```
{shell}
> source $LECABASHHOME/lecabashlib.sh
> include signal
```
### Functions provided:
#### registertrap
```
{shell}
registertrap <SIGNAME> <COMMAND>
```
#### run
```
{shell}
run <SIGNAME1> <SIGNAME1> <COMMAND>
```
----------------------------------------------------------
...
...
@@ -494,7 +530,7 @@ Closes the current logfile and redirect the logging to stderr.
### Activating the module
```
{shell}
> source $LECABASHHOME/
utils
.sh
> source $LECABASHHOME/
lecabashlib
.sh
> include stacks
```
...
...
@@ -545,7 +581,7 @@ and the return status is set to *1* instead of *0* usually.
### Activating the module
```
{shell}
> source $LECABASHHOME/
utils
.sh
> source $LECABASHHOME/
lecabashlib
.sh
> include tempdir
```
...
...
@@ -583,7 +619,7 @@ and the return status is set to *1* instead of *0* usually.
### Activating the module
```
{shell}
> source $LECABASHHOME/
utils
.sh
> source $LECABASHHOME/
lecabashlib
.sh
> include timeout
```
...
...
@@ -600,7 +636,7 @@ and the return status is set to *1* instead of *0* usually.
### Activating the module
> source $LECABASHHOME/
utils
.sh
> source $LECABASHHOME/
lecabashlib
.sh
> include path
### Functions provided:
...
...
@@ -625,7 +661,7 @@ The *irods* module define a set of function wrapping the classical `iput` and
### Activating the module
```
{shell}
> source $LECABASHHOME/
utils
.sh
> source $LECABASHHOME/
lecabashlib
.sh
> include irods
```
...
...
@@ -686,7 +722,7 @@ count is reached.
### Activating the module
```
{shell}
> source $LECABASHHOME/
utils
.sh
> source $LECABASHHOME/
lecabashlib
.sh
> include xml
```
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment