Skip to content

Commit

Permalink
Bugfix and custom user install
Browse files Browse the repository at this point in the history
- Fix tee `--append` argument
- Use cp instead of mv in installation script
- Fix permissions
- Use $USER and $GROUP instead of assuming both are `bcadmin`
  • Loading branch information
tw4l committed Sep 22, 2023
2 parents e1f9c1d + 97c18f0 commit 6f846cb
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions install
Expand Up @@ -9,11 +9,11 @@ if [ -d $install_dir ]; then
fi
sudo mkdir $install_dir

sudo mv design.py $install_dir
sudo mv design.ui $install_dir
sudo mv icon.png $install_dir
sudo mv launch $install_dir
sudo mv main.py $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'

Expand All @@ -27,11 +27,12 @@ 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
echo 'Categories=Forensics and Reporting' | sudo tee --append $desktop_file

sudo chown bcadmin:bcadmin $desktop_file
GROUP=$(id -gn)
sudo chown $USER:$GROUP $desktop_file
sudo chmod 644 $desktop_file
sudo chown -R bcadmin:bcadmin $install_dir
sudo chown -R $USER:$GROUP $install_dir

sudo chmod u+x $desktop_file
sudo chmod u+x $install_dir/launch
sudo chmod +x $desktop_file
sudo chmod +x $install_dir/launch

0 comments on commit 6f846cb

Please sign in to comment.