-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·27 lines (20 loc) · 766 Bytes
/
run.sh
File metadata and controls
executable file
·27 lines (20 loc) · 766 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
# Check if the number of tabs is provided as an argument
if [ $# -ne 2 ]; then
echo "Usage: $0 <number_of_processes> <running_mode> (demo | example)"
exit 1
fi
# Extract the number of tabs from the first argument
num_tabs="$1"
running_mode="$2"
# Specify the folder path
folder_path="/home/aleister/Repos/ses-algorithm"
# Loop through and open tabs
for ((i = 0; i <= num_tabs; i++)); do
# Calculate the command to be executed
command="./gradlew process${i} -Prunning_mode=${running_mode}"
# Set the tab's name
tab_name="Process${i}"
# Open a new tab with the specified working directory and command, setting the name
gnome-terminal --tab --working-directory="$folder_path" --title="Process${i}" -- zsh -c "$command; exec zsh"
done