-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_project.sh
executable file
·64 lines (49 loc) · 974 Bytes
/
run_project.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/bash
update_repo() {
echo "updating GitHub repository..."
git add .
echo 'enter commit message:'
read commitMessage
git commit -m "$commitMessage"
branch="main"
git push origin $branch
echo "update done."
}
cleanup () {
echo "cleaning up..."
# cleanup sent/received files
rm speech_response.mp3
rm text_response.txt
rm *.wav
echo "cleanup done."
}
# Parse command-line arguments
while [[ $# -gt 0 ]]; do
key="$1"
case $key in
--update_repo)
update_repo_only=true
;;
--cleanup)
cleanup_only=true
;;
*)
echo "Unknown option: $key"
exit 1
;;
esac
shift
done
# If no arguments are provided, execute all parts by default
if [[ ! $update_repo_only && ! $cleanup_only ]]; then
# update_repo
# cleanup
exit 0
fi
# Execute the selected parts based on command-line arguments
if [[ $update_repo_only ]]; then
update_repo
fi
if [[ $cleanup_only ]]; then
cleanup
fi