forked from ahurac/dotfiles
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
|
cd "$(dirname "$realpath")/../share/$(basename "$realpath")" || exit
|
||||||
unset realpath
|
unset realpath
|
||||||
|
|
||||||
|
scripts_d=./scripts.d
|
||||||
|
|
||||||
# Fonction pour fabriquer une ligne de la longueur d'un tiers du terminal
|
# Fonction pour fabriquer une ligne de la longueur d'un tiers du terminal
|
||||||
makeline() {
|
makeline() {
|
||||||
local cols line
|
local cols line
|
||||||
|
@ -25,8 +27,22 @@ separator() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Procédure principale
|
# Procédure principale
|
||||||
for i in ./commands.d/*; do
|
main() {
|
||||||
separator "$(basename "$i")"
|
for i in "${scripts_d}/"*; do
|
||||||
"$i"
|
separator "$(basename "$i")"
|
||||||
done
|
"$i"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
script="$1"
|
||||||
|
shift
|
||||||
|
|
||||||
|
case "$script" in
|
||||||
|
"")
|
||||||
|
main "$@"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
"${scripts_d}/${script}" "$@"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue