forked from ahurac/dotfiles
28 lines
496 B
Bash
Executable file
28 lines
496 B
Bash
Executable file
#!/bin/bash
|
|
|
|
# cd
|
|
cd "${HOME}/.config/$(basename "$(readlink -f "$0")")" || exit
|
|
|
|
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
|