-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathinstall
executable file
·38 lines (29 loc) · 1.04 KB
/
install
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
#!/bin/bash
python3 -m pip install pyqt5
install_dir='/usr/share/brunnhilde-gui'
if [ -d $install_dir ]; then
sudo rm -rf $install_dir
fi
sudo mkdir $install_dir
sudo cp design.py $install_dir
sudo cp design.ui $install_dir
sudo cp icon.png $install_dir
sudo cp launch $install_dir
sudo cp main.py $install_dir
desktop_file='/usr/share/applications/BrunnhildeGUI.desktop'
if [ -f $desktop_file ]; then
sudo rm -rf $desktop_file
fi
sudo touch $desktop_file
echo '[Desktop Entry]' | sudo tee --append $desktop_file
echo 'Type=Application' | sudo tee --append $desktop_file
echo 'Name=Brunnhilde GUI' | sudo tee --append $desktop_file
echo 'Exec=/usr/share/brunnhilde-gui/launch' | sudo tee --append $desktop_file
echo 'Icon=/usr/share/brunnhilde-gui/icon.png' | sudo tee --append $desktop_file
echo 'Categories=Forensics and Reporting' | sudo tee --append $desktop_file
GROUP=$(id -gn)
sudo chown $USER:$GROUP $desktop_file
sudo chmod 644 $desktop_file
sudo chown -R $USER:$GROUP $install_dir
sudo chmod +x $desktop_file
sudo chmod +x $install_dir/launch