-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall_bauh.sh
executable file
·51 lines (41 loc) · 1.37 KB
/
install_bauh.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
#!/bin/bash
#to run this script go into the folder where it is then run: ./install_bauh.sh
FOLDERNAME="bauh"
set -eu
function check_install {
echo "checking install: "$1
dpkg -l | grep -qw $1 || sudo apt-get install $1 -y
}
#sudo apt install flatpak -y
check_install flatpak
flatpak remote-add --user --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
if [ -d "/home/$USER/programs_setup/$FOLDERNAME" ]; then
cd /home/$USER/
rm -rf /home/$USER/.local/share/applications/bauh.desktop
rm -rf /home/$USER/programs_setup/$FOLDERNAME
echo "done removing $FOLDERNAME"
exit
fi
sudo apt-get install python3-pip python3-requests python3-yaml python3-venv -y
mkdir -p /home/$USER/programs_setup/bauh
cd /home/$USER/programs_setup/bauh
python3 -m venv bauh_env
bauh_env/bin/pip install bauh
bauh_env/bin/bauh
#cd /home/$USER/programs_setup/bauh
#bauh_env/bin/pip install bauh --upgrade
cat << EOF | tee /home/$USER/.local/share/applications/bauh.desktop
[Desktop Entry]
Name=bauh
Comment=Install and remove applications (AppImage, Arch, Flatpak, Snap, Web)
Exec=/home/xxUserxx/programs_setup/bauh/bauh_env/bin/bauh
Icon=bauh
Terminal=false
Type=Application
Categories=System;
EOF
cd /home/$USER/.local/share/applications
sed -i 's/xxUserxx/'$USER'/' bauh.desktop
cd /home/$USER
mkdir -p ~/.local/share/bauh/appimage/installed
#cd ~/.local/share/bauh/appimage/installed