1
0
Fork 0
forked from ahurac/dotfiles
ahuarc-dotfiles/bin/updateall

29 lines
496 B
Text
Raw Normal View History

2023-04-13 00:04:20 +02:00
#!/bin/bash
# cd
cd "${HOME}/.config/$(basename "$(readlink -f "$0")")" || exit
2023-04-13 00:57:54 +02:00
scripts_d=./scripts
# Procédure principale
main() {
for i in "${scripts_d}/"*; do
separator "$(basename "$i" | cut -d '-' -f 2)"
"$i"
done
}
script="$1"
shift
case "$script" in
"")
main "$@"
;;
*)
# Oui, ShellCheck, c'est bel et bien ce que j'essaie de faire
# shellcheck disable=SC2211
"${scripts_d}/"??"-${script}" "$@"
;;
esac