diff --git a/_test/_mas_test.sh b/_test/_mas_test.sh index 0d94fb4..918da0e 100755 --- a/_test/_mas_test.sh +++ b/_test/_mas_test.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash if [[ "${1}" == "latest" ]]; then - echo "mas" + echo "_mas_test.sh: mas" fi diff --git a/_test/param.sh b/_test/param.sh index 0aa598c..99ad16e 100755 --- a/_test/param.sh +++ b/_test/param.sh @@ -1,12 +1,14 @@ #!/usr/bin/env bash if [[ "${1}" == "latest" ]]; then - echo $1 + echo "param.sh: $1" fi #[ -d ~/.kymsu/plugins.d -a -x ~/.kymsu/plugins.d ] && find ~/.kymsu/plugins.d -type f -name '*.sh' -perm +u+x -exec bash -c {} ${1:no-cleanup} \; -find . -type f -name '_mas*.sh' -perm +u+x -exec bash -c {} "$1" \; +find . -type f -name '_mas_test.sh' -perm +u+x -exec bash -c {} $1 \; + +#/Users/bruno/Documents/Scripts/_test/_mas_test.sh $1 #find ~/.kymsu/plugins.d -type f -name '_m*.sh' -perm +u+x | xargs exec "$1" ; diff --git a/kymsu2.sh b/kymsu2.sh new file mode 100755 index 0000000..3217f47 --- /dev/null +++ b/kymsu2.sh @@ -0,0 +1,31 @@ +#!/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 + +# On boucle sur tous les fichiers du répertoire… +for script in $(ls $SCRIPTS_DIR); do + # si le fichier est exécutable… + if [ -x "$SCRIPTS_DIR/$script" ]; then + # on l’exécute ; le $@ permet de passer à chaque + # script les arguments passés à *ce* script + $SCRIPTS_DIR/$script $@ + fi +done \ No newline at end of file