From 67d5953c38e831942fcefcde13a3a558d4cddf43 Mon Sep 17 00:00:00 2001 From: Tykayn Date: Wed, 14 Feb 2024 16:41:33 +0100 Subject: [PATCH] up --- assets/.bash_aliases | 1 + assets/.bash_custom_aliases | 8 ++++---- assets/.zshrc | 11 +++++++++++ initialization/init_workflow.sh | 8 ++++---- initialization/partials/check_folder_integrity.sh | 3 +++ variables.sh | 6 ++++++ workflow_variables.sh | 10 +++++++++- 7 files changed, 38 insertions(+), 9 deletions(-) diff --git a/assets/.bash_aliases b/assets/.bash_aliases index 1bea642..21bb748 100644 --- a/assets/.bash_aliases +++ b/assets/.bash_aliases @@ -4,5 +4,6 @@ # done for my blog http://www.cipherbliss.com # # load variables +echo " chargement de bash aliases" source ~/Nextcloud/ressources/workflow_nextcloud/public_workflow/workflow_variables.sh source $WORKFLOW_PATH_PUBLIC/install/.bash_custom_aliases \ No newline at end of file diff --git a/assets/.bash_custom_aliases b/assets/.bash_custom_aliases index d41fd88..37b38b8 100644 --- a/assets/.bash_custom_aliases +++ b/assets/.bash_custom_aliases @@ -1,10 +1,10 @@ #!/bin/bash -# these bash aliases are meant to be added in your user folder, -# in a file named: .bash_aliases (with the dot at the beginning) +# these bash aliases are meant to be added in your user folder, +# in a file named: .bash_aliases (with the dot at the beginning) # done for my blog http://www.cipherbliss.com # -# load variables -#echo "load functions to sync files" +# load variables +echo "bash custom aliases: load functions to sync files" source ~/Nextcloud/ressources/workflow_nextcloud/public_workflow/workflow_variables.sh diff --git a/assets/.zshrc b/assets/.zshrc index 3d38210..bc61571 100644 --- a/assets/.zshrc +++ b/assets/.zshrc @@ -75,6 +75,12 @@ plugins=(git cp colored-man-pages colorize command-not-found composer symfony2 p source $ZSH/oh-my-zsh.sh # User configuration +if [ -f ~/Nextcloud/ressources/workflow_nextcloud/workflow_variables.sh ]; then + . ~/Nextcloud/ressources/workflow_nextcloud/workflow_variables.sh +else + echo "/!\\ bashrc: fichier de variables workflow_nextcloud non trouvé:" + echo "~/Nextcloud/ressources/workflow_nextcloud/workflow_variables.sh" +fi # export MANPATH="/usr/local/man:$MANPATH" @@ -100,4 +106,9 @@ if [[ -n $SSH_CONNECTION ]]; then # alias zshconfig="mate ~/.zshrc" # alias ohmyzsh="mate ~/.oh-my-zsh" +if [ "$debug" = true ]; then + echo "chargement des aliases ~/.bash_aliases" +fi + + source ~/.bash_aliases diff --git a/initialization/init_workflow.sh b/initialization/init_workflow.sh index 1c3e082..44d416f 100644 --- a/initialization/init_workflow.sh +++ b/initialization/init_workflow.sh @@ -1,7 +1,7 @@ #!/bin/bash -# -# mise en place du workflow -# + +# mise en place du workflow + echo "========== init de workflow par Tykayn =======" source ~/Nextcloud/ressources/workflow_nextcloud/public_workflow/workflow_variables.sh @@ -12,8 +12,8 @@ bash "$WORKFLOW_PATH_PUBLIC/initialization/partials/dev_tools.sh" bash "$WORKFLOW_PATH_PUBLIC/initialization/partials/java-josm.sh" # bash $WORKFLOW_PATH_PUBLIC/update_git_projects.sh - # copier quelques fichiers de config dans la home +echo "copier quelques fichiers de config dans la home" cp "$WORKFLOW_PATH_PUBLIC/assets/.*" "~/" cp "$WORKFLOW_PATH_PUBLIC/assets/konsole.profile" "~/" cp "$WORKFLOW_PATH_PUBLIC/assets/guessfilenameconfig.py" "~/" diff --git a/initialization/partials/check_folder_integrity.sh b/initialization/partials/check_folder_integrity.sh index 2c22d95..8ee627a 100644 --- a/initialization/partials/check_folder_integrity.sh +++ b/initialization/partials/check_folder_integrity.sh @@ -4,6 +4,9 @@ # les créer au besoin, # alerter sur l'impossibilité de créer en ajoutant une tâche orgmode au dossier de textes # +if [ "$debug" = true ]; then + echo "# ========== vérifier l'intégrité des dossiers ==========#" +fi if [ ! -d $WORKFLOW_PATH ]; then echo "création du dossier nextcloud workflow_nextcloud" mkdir -p $WORKFLOW_PATH diff --git a/variables.sh b/variables.sh index 931179d..89999a4 100644 --- a/variables.sh +++ b/variables.sh @@ -1,7 +1,13 @@ #!/bin/bash # variables globales qui seront importées dans chaque terminal ouvert par l'utilisateur +if [ "$debug" = true ]; then + echo "# chargement des variables de public workflow ..." +fi source "$WORKFLOW_PATH/secrets.sh" #echo " exemple de secret importé dans le workflow: $secret_key " +if [ "$debug" = true ]; then + echo "# chargement des variables de public workflow OK --------" +fi \ No newline at end of file diff --git a/workflow_variables.sh b/workflow_variables.sh index 9f6c5f9..f8acfb9 100644 --- a/workflow_variables.sh +++ b/workflow_variables.sh @@ -4,6 +4,10 @@ # source ~/Nextcloud/ressources/workflow_nextcloud/public_workflow/workflow_variables.sh # # +export debug=true +if [ "$debug" = true ]; then + echo "# chargement des variables de workflow" +fi export main_user="tykayn" @@ -83,4 +87,8 @@ exclude_opts=() export exclude_opts -bash $WORKFLOW_PATH_PUBLIC/variables.sh \ No newline at end of file +if [ "$debug" = true ]; then + echo "# chargement des variables de workflow OK --------" +fi + +source $WORKFLOW_PATH_PUBLIC/variables.sh \ No newline at end of file