@@ -24,41 +24,44 @@ install_dir="$HOME/.local/share/project-babble"
24
24
25
25
# Function to install requirements
26
26
install_requirements () {
27
+ cd $install_dir
28
+ cd BabbleApp
29
+ echo " Installing requirements..."
27
30
# Create a temporary requirements file without the Windows-only package
28
31
grep -v " onnxruntime-directml" requirements.txt > linux_requirements.txt
29
32
pip install -r linux_requirements.txt --quiet
30
33
rm linux_requirements.txt
31
34
}
32
35
33
- # Function to update the repository
34
- update_repo () {
35
- echo " Checking for updates..."
36
- git fetch
37
- if [ " $( git rev-parse HEAD) " != " $( git rev-parse @{u}) " ]; then
38
- echo " Updates found. Pulling changes..."
39
- git pull
40
- echo " Updating dependencies..."
41
- source venv/bin/activate
42
- install_requirements
43
- deactivate
44
-
45
- # Add babbleapp.sh to PATH
46
- mkdir -p " $HOME /.local/bin"
47
- ln -s " $install_dir /babbleapp.sh" " $HOME /.local/bin/babble-app"
48
- chmod +x " $HOME /.local/bin/babble-app"
49
-
50
- # Add ~/.local/bin to PATH if not already present
51
- if [[ " :$PATH :" != * " :$HOME /.local/bin:" * ]]; then
52
- echo ' export PATH="$HOME/.local/bin:$PATH"' >> " $HOME /.bashrc"
53
- echo " Please restart your terminal or run 'source ~/.bashrc' to update your PATH."
54
- fi
36
+ # Function to get the latest release tag
37
+ get_latest_tag () {
38
+ git fetch --tags
39
+ git describe --tags --abbrev=0
40
+ }
55
41
56
- echo " Project Babble has been updated successfully!"
57
- else
58
- echo " Project Babble is already up to date."
42
+ # Function to update the repository
43
+ update_repo () {
44
+ echo " Checking for updates..."
45
+ git fetch --tags
46
+ local_tag=$( git describe --tags --abbrev=0)
47
+ remote_tag=$( git describe --tags --abbrev=0 origin/main)
48
+
49
+ if [ " $local_tag " != " $remote_tag " ]; then
50
+ echo " New version available: $remote_tag "
51
+ echo " Current version: $local_tag "
52
+ echo " Updating to the latest version..."
53
+ git checkout " $remote_tag "
54
+ echo " Updating dependencies..."
55
+ source venv/bin/activate
56
+ install_requirements
57
+ deactivate
58
+ echo " Project Babble has been updated successfully to version $remote_tag !"
59
+ else
60
+ echo " Project Babble is already at the latest version: $local_tag "
59
61
fi
60
62
}
61
63
64
+
62
65
cd $install_dir
63
66
update_repo
64
67
source venv/bin/activate
0 commit comments