2021-05-16 17:53:27 -04:00
|
|
|
#!/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"
|
2022-01-24 14:00:47 -05:00
|
|
|
"${working_path}/addons/OCA_server-tools"
|
2021-05-16 17:53:27 -04:00
|
|
|
|
|
|
|
|
)
|
|
|
|
|
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=""
|
2022-01-24 14:00:47 -05:00
|
|
|
for t in "${paths[@]}"; do
|
2021-05-16 17:53:27 -04:00
|
|
|
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}"
|