Skip to content

LLyaudet/DevOrSysAdminScripts

Repository files navigation

DevOrSysAdminScripts

CodeFactor-badge CodeClimateMaintainability-badge Codacy-badge GitHub-top-language-badge GitHub-license-badge GitHub-code-size-in-bytes-badge

Some "small" useful scripts
for enhancing development or system-administrators tasks

Currently, the biggest part of this repository is in a suite of shell scripts about build and checks that I use in some of my other repositories.

I tried to follow some conventions for my bash code:

  • I tried to encapsulate most of the code in functions.
  • Unless used as return values, variables in functions are defined as local variables (local keyword or declare) with prefix "LFBFL_".
  • When used as return values, variables in functions are defined as global variables (declare -g) with prefix "@function_name@result".
  • Whenever a variable is no more modified after some point, add the keyword readonly or use declare -r.
  • Whenever a variable will only contain integer values (or boolean values as 0 or 1), use declare -i.
  • I named bash files with suffixes ".exec.sh" when the script can be runned (executable, abbreviation stops before a vowel).
  • I named bash files with suffixes ".libr.sh" when the script contains only functions definitions (library, abbreviation stops before a vowel).
  • When some ".exec.sh" code is encapsulated into functions, either these functions can be reused and go in some ".libr.sh" file, either they are truly specific to this script and they are kept in ".exec.sh" file.

But the files "pre-commit" and "post-commit" were not renamed, since it is not possible to give them other names to use them as pre-commit/post-commit hooks in git.

About

Some small useful scripts

Resources

License

LGPL-3.0, GPL-3.0 licenses found

Licenses found

LGPL-3.0
COPYING.LESSER
GPL-3.0
COPYING

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published