[ADD] script open terminal to improve code generator development

This commit is contained in:
Mathieu Benoit 2021-05-16 17:53:27 -04:00
parent a3cc183e25
commit bfd7826492
2 changed files with 31 additions and 0 deletions

View file

@ -192,6 +192,13 @@ test_code_generator_template: db_restore_erplibre_base_db_template addons_instal
.PHONY: test_code_generator_demo
test_code_generator_demo: db_restore_erplibre_base_db_template addons_install_all_generated_demo clean_code_generator_template
##############
# terminal #
##############
.PHONY: open_terminal
open_terminal:
./script/open_terminal_code_generator.sh
############
# format #
############

View file

@ -0,0 +1,24 @@
#!/usr/bin/env bash
# Open a new gnome-terminal with different path on new tab
working_path=`readlink -f .`
paths=(
"${working_path}/"
"${working_path}/addons/TechnoLibre_odoo-code-generator"
"${working_path}/addons/TechnoLibre_odoo-code-generator-template"
)
cmd_before="cd "
# when change directory, open a new tab with command to execute
cmd_after=";gnome-terminal --tab -- bash -c 'git status;bash';"
#cmd_after=";gnome-terminal --tab;"
LONGCMD=""
for t in ${paths[@]}; do
LONGCMD+=${cmd_before}${t}${cmd_after}
done
#echo $LONGCMD
# Open all terminal from paths list
#echo "gnome-terminal --window -- bash -c \"${LONGCMD}\""
gnome-terminal --window -- bash -c "${LONGCMD}"