Ajout : possibilité d'appeler un script en particulier depuis updateall
This commit is contained in:
parent
00e3b9a609
commit
e14a5ff310
1 changed files with 20 additions and 4 deletions
|
@ -7,6 +7,8 @@ realpath="$(readlink -f "$0")"
|
|||
cd "$(dirname "$realpath")/../share/$(basename "$realpath")" || exit
|
||||
unset realpath
|
||||
|
||||
scripts_d=./scripts.d
|
||||
|
||||
# Fonction pour fabriquer une ligne de la longueur d'un tiers du terminal
|
||||
makeline() {
|
||||
local cols line
|
||||
|
@ -25,8 +27,22 @@ separator() {
|
|||
}
|
||||
|
||||
# Procédure principale
|
||||
for i in ./commands.d/*; do
|
||||
separator "$(basename "$i")"
|
||||
"$i"
|
||||
done
|
||||
main() {
|
||||
for i in "${scripts_d}/"*; do
|
||||
separator "$(basename "$i")"
|
||||
"$i"
|
||||
done
|
||||
}
|
||||
|
||||
script="$1"
|
||||
shift
|
||||
|
||||
case "$script" in
|
||||
"")
|
||||
main "$@"
|
||||
;;
|
||||
*)
|
||||
"${scripts_d}/${script}" "$@"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
Loading…
Reference in a new issue