-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrun_tasks.sh
More file actions
54 lines (48 loc) · 1.27 KB
/
run_tasks.sh
File metadata and controls
54 lines (48 loc) · 1.27 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
#!/bin/bash
# Usage: run_tasks.sh <task>
# <task> all / factory / warehouse / retail
TASK="$1"
# Define the script to run and the input file based on the task
case "$TASK" in
all)
SCRIPT="
while IFS= read -r line; do
python3 demo/run.py --task_name \$line --result_dir results/
done < all_task_ids_factory.txt
while IFS= read -r line; do
python3 demo/run.py --task_name \$line --result_dir results/
done < all_task_ids_warehouse.txt
while IFS= read -r line; do
python3 demo/run.py --task_name \$line --result_dir results/
done < all_task_ids_retail.txt
"
;;
factory)
SCRIPT="
while IFS= read -r line; do
python3 demo/run.py --task_name \$line --result_dir results/
done < all_task_ids_factory.txt
"
;;
warehouse)
SCRIPT="
while IFS= read -r line; do
python3 demo/run.py --task_name \$line --result_dir results/
done < all_task_ids_warehouse.txt
"
;;
retail)
SCRIPT="
while IFS= read -r line; do
python3 demo/run.py --task_name \$line --result_dir results/
done < all_task_ids_retail.txt
"
;;
*)
echo "Usage: $0 <task>"
echo " <task> all / factory / warehouse / retail"
exit 1
;;
esac
# Execute the script
eval "$SCRIPT"