2023-11-21 16:52:05 +01:00
|
|
|
#!/bin/sh
|
2023-04-13 00:04:20 +02:00
|
|
|
|
2023-06-04 19:38:42 +02:00
|
|
|
# cd
|
2023-11-21 16:50:06 +01:00
|
|
|
cd "${HOME}/.config/$(basename "$(readlink -f "$0")")" || exit
|
2023-04-13 00:57:54 +02:00
|
|
|
|
2023-10-10 08:11:37 +02:00
|
|
|
scripts_d=./scripts
|
2023-06-16 11:44:11 +02:00
|
|
|
|
2023-06-04 19:38:42 +02:00
|
|
|
# Procédure principale
|
2023-06-16 11:44:11 +02:00
|
|
|
main() {
|
|
|
|
for i in "${scripts_d}/"*; do
|
2023-09-15 10:04:54 +02:00
|
|
|
separator "$(basename "$i" | cut -d '-' -f 2)"
|
2023-06-16 11:44:11 +02:00
|
|
|
"$i"
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
2023-11-21 16:52:05 +01:00
|
|
|
case "$1" in
|
2023-06-16 11:44:11 +02:00
|
|
|
"")
|
|
|
|
main "$@"
|
|
|
|
;;
|
|
|
|
*)
|
2023-10-19 18:47:50 +02:00
|
|
|
# Oui, ShellCheck, c'est bel et bien ce que j'essaie de faire
|
|
|
|
# shellcheck disable=SC2211
|
2023-11-21 16:52:05 +01:00
|
|
|
"${scripts_d}/"??"-${1}" "$@"
|
2023-06-16 11:44:11 +02:00
|
|
|
;;
|
|
|
|
esac
|