Skip to content
Snippets Groups Projects
Commit d0b7d107 authored by Antonio Ragagnin's avatar Antonio Ragagnin :speech_balloon:
Browse files

fix clone

parent 6fbdf337
No related branches found
No related tags found
No related merge requests found
...@@ -63,19 +63,23 @@ if [ ! -z "$tmuxa" ]; then ...@@ -63,19 +63,23 @@ if [ ! -z "$tmuxa" ]; then
if ! tmux has-session -t $SESSION_NAME ; then if ! tmux has-session -t $SESSION_NAME ; then
# Create a new tmux session # Create a new tmux session
tmux new-session -d -s $SESSION_NAME -c $PWD
[[ -d full ]] && REPOS+=(full) [[ -d full ]] && REPOS+=(full)
for index in "${!REPOS[@]}"; do for index in "${!REPOS[@]}"; do
value="${REPOS[index]}" value="${REPOS[index]}"
if [[ "$index" == 0 ]]; then
tmux new-session -d -s $SESSION_NAME -c $PWD
else
tmux new-window -t $SESSION_NAME -c $PWD
fi
# Initialize the environment in the first window # Initialize the environment in the first window
tmux send-keys -t $SESSION_NAME:$index ". .env" C-m tmux send-keys -t $SESSION_NAME:$index ". .env" C-m
tmux send-keys -t $SESSION_NAME:$index ". venv/bin/activate" C-m tmux send-keys -t $SESSION_NAME:$index ". venv/bin/activate" C-m
tmux send-keys -t $SESSION_NAME:$index "cd $PWD/$value" C-m tmux send-keys -t $SESSION_NAME:$index "cd $PWD/$value" C-m
tmux rename-window $value tmux rename-window $value
tmux new-window -t $SESSION_NAME -c $PWD
done done
fi fi
tmux attach-session -t $SESSION_NAME tmux attach-session -t $SESSION_NAME
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment