Files
shell_scripts/kymsu2.sh
Bruno 21 f7e79339cf kymsu2.sh
-les scripts sont lancés par ordre alphabétique
2018-08-25 19:06:14 +02:00

33 lines
1.0 KiB
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
if [[ "$1" == "-h" || "$1" == "--help" ]]; then
echo -e "\033[93m\033[1mkymsu2\033[0m"
echo ""
echo "Keep Your macOs Stuff Updated 2"
echo "a fork from kymsu https://github.com/welcoMattic/kymsu"
echo
echo "USAGE: kymsu2"
echo
echo "Commandes: "
echo " -h, --help display this help"
echo " --nodistract no distract mode (no user interaction)"
echo " --cleanup removing any older versions of installed formulae and clearing old downloads from the Homebrew download-cache"
echo " --npm_cleanup cleaning npm cache"
echo
exit 0
fi
# à renseigner avec le répertoire contenant tes script
SCRIPTS_DIR=/Users/bruno/.kymsu/plugins.d
cd "$SCRIPTS_DIR"
# On boucle sur tous les fichiers du répertoire…
for script in $(find . -name '[_0]*' -maxdepth 1 | sort); do
# si le fichier est exécutable…
if [ -x "$SCRIPTS_DIR/$script" ]; then
# on lexécute ; le $@ permet de passer à chaque
# script les arguments passés à *ce* script
$SCRIPTS_DIR/$script $@
fi
done