-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhelp.sh
More file actions
executable file
·76 lines (66 loc) · 1.66 KB
/
Copy pathhelp.sh
File metadata and controls
executable file
·76 lines (66 loc) · 1.66 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/bin/bash
# Define the packages and projects lists
packages=(
# "media"
)
projects=(
"fellowship"
"thrift_findr"
)
# Define the project suffixes
suffixes=(
"_package"
"_app"
"_dashboard"
)
# Define the commands to run in each directory
commands=(
# "flutter clean"
# "flutter pub get"
# "dart run build_runner build --delete-conflicting-outputs"
# "git pull origin main"
"git checkout main"
"git config pull.rebase false"
"git pull origin serena"
# "git merge origin tags-refactor"
)
# Commands to run in packages top level directory
packagesCommands=(
"git checkout main"
"git config pull.rebase false"
"git pull origin serena"
# "git merge origin main"
)
# Function to run specified commands in the given directory if it exists
run_commands() {
if [ -d "$1" ]; then
echo "Entering $1"
cd "$1"
for command in "${commands[@]}"; do
echo "Running: $command"
$command
done
cd - > /dev/null
echo "Finished running commands in $1"
else
echo "Directory $1 does not exist"
fi
}
# Run commands in top level packages
echo "In Packages"
for command in "${packagesCommands[@]}"; do
echo "Running: $command"
$command
done
echo "Finished running commands in packages"
# Run commands in the specified packages
for package in "${packages[@]}"; do
run_commands "$package"
done
# Run commands in the specified projects with their suffixes
for project in "${projects[@]}"; do
for suffix in "${suffixes[@]}"; do
project_dir="../clients/$project/$project$suffix"
run_commands "$project_dir"
done
done