-
Notifications
You must be signed in to change notification settings - Fork 0
/
ci.sh
executable file
·42 lines (34 loc) · 854 Bytes
/
ci.sh
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
#!/bin/bash
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
# Array contenente le directory in cui eseguire npm install
node_dirs=(
"./bakeca-scraper/"
"./db-api/"
"./client-api/"
"./fb-scraper/"
"./parser/"
"./webapp/"
)
bun_dirs=(
"./subito-scraper/"
"./zappyrent-scraper/"
)
# Funzione per eseguire npm install in background
function run_npm_install() {
local directory=$1
(cd "$directory" && npm install) &
}
function run_bun_install() {
local directory=$1
(cd "$directory" && bun install) &
}
# Itera sulle directory e avvia npm install in background per ciascuna
for dir in "${node_dirs[@]}"; do
run_npm_install "$dir"
done
for dir in "${bun_dirs[@]}"; do
run_bun_install "$dir"
done
# Attende il completamento di tutti i processi in background
wait
echo "Tutti i comandi npm install e bun install sono stati completati."