terminal-save
echo
echo "Récupération du contenu vers $projectDestPath"
rsync --compress --rsh="ssh -p $devPort" -a --info=progress2 --exclude '*.log' --exclude 'node_modules/' --exclude '.scannerwork/' $devUserName@$devHost:$projectDevPath $projectDestPath
terminal-restore
echo -e " + Fichiers \e[1;92mrécupérés \e[0mvers \e[1m$projectDestPath\e[0m"
terminal-save
echo "Build du projet"
# get distant (but rsync in local) database parameters
cd $projectDestPath
npm install
npm run build
{#if [[ -f .env.local ]]; then#}
{# ENV_FILE=".env.local"#}
{#elif [[ -f .env ]]; then#}
{# ENV_FILE=".env"#}
{#else#}
{# echo#}
{# echo "Erreur"#}
{# echo "Détection .env.local inexistant";#}
{# exit 1#}
{#fi#}
terminal-switch-first