PyBitmessage appimage setup

This commit is contained in:
tb14
2022-10-18 15:28:39 -05:00
parent 93bfe149ff
commit 3ba270d555
2 changed files with 67 additions and 9 deletions
+66 -9
View File
@@ -1769,6 +1769,25 @@ Categories=Network;Security;" > $HOME/Desktop/pybitmessage.desktop ||
{ ERRCODE="Failed to create desktop icon for Bitmessage"; errors; }
fi
if [[ -f $SECDIR/$BMAIVER ]]; then
echo "[Desktop Entry]
Name=PyBitmessage
GenericName=Bitmessage
Comment=Secure Email
Exec=$SECDIR/$BMAIVER &
Icon=$USERDIR/icons/bitmessage.png
Terminal=false
Type=Application
Categories=Network;Security;" > $HOME/Desktop/pybitmessage.desktop ||
{ ERRCODE="Failed to create desktop icon for Bitmessage"; errors; }
if [[ ! -f $USERDIR/icons/bitmessage.png ]]; then
mkdir -p $USERDIR/icons && wget -N https://wiki.bitmessage.org/images/f/f1/Bitmessagelogo-reduced.png && mv Bitmessagelogo-reduced.png \
$USERDIR/icons/bitmessage.png ||
{ ERRCODE="Failed to download icon image for PyBitmessage"; errors; }
fi
fi
if hash veracrypt 2>/dev/null; then
echo "[Desktop Entry]
Name=Veracrypt
@@ -2623,24 +2642,63 @@ fi
function bitmessage_install() {
if apt-cache show python-qt4 &>/dev/null; then
if hash pybitmessage 2>/dev/null; then
if hash pybitmessage 2>/dev/null; then
cd $SECDIR/PyBitmessage/src && git fetch --all && git reset --hard \
origin/master ||
cd $SECDIR/PyBitmessage/src && git fetch --all && git reset --hard origin/master ||
{ ERRCODE="Failed to update Bitmessage"; errors; return; }
else
sudo apt-get install -y python openssl libssl-dev git python-msgpack python-qt4 ||
sudo apt-get install -y python openssl libssl-dev git python-msgpack python-qt4 ||
{ ERRCODE="Failed to get dependencies for Bitmessage"; errors; return; }
cd $SECDIR/ && git clone https://github.com/Bitmessage/PyBitmessage ||
cd $SECDIR/ && git clone https://github.com/Bitmessage/PyBitmessage ||
{ ERRCODE="Failed to download Bitmessage"; errors; return; }
cd $SECDIR/PyBitmessage && sudo python setup.py install ||
cd $SECDIR/PyBitmessage && sudo python setup.py install ||
{ ERRCODE="Failed to install Bitmessage"; errors; return; }
fi
fi
echo pybitmessagesetup >> /tmp/cleanup
## Get PyBitmessage via appimage if running Linuxmint
elif [[ $PLAT = Linuxmint ]]; then
BMAIRELDATE=$(curl -s https://appimage.bitmessage.org/releases/ | tail -n 3 | grep -o [0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9] | tail -n 1)
BMAIFILE=$(curl -s https://appimage.bitmessage.org/releases/20221018/ | grep .AppImage | awk -F '"' '{print $2}')
if [[ -f $SECDIR/$BMAIFILE ]]; then
BMAIVER=$(ls $SECDIR | grep PyBitmessage*.AppImage)
if [[ $BMAIVER = $DMAIFILE ]]; then
echo "PyBitmessage AppImage already at current available version"; return
else
cd $SECDIR && wget -N https://appimage.bitmessage.org/releases/${BMAIRELDATE}/${BMAIFILE} ||
{ ERRCODE = "Failed to Download PyBitmessage AppImage."; errors; return; }
chmod a+x $SECDIR/$BMAIFILE ||
{ ERRCODE = "Failed to set execute permissions on PyBitmessage AppImage."; errors; return; }
rm $SECDIR/$BMAVER ||
{ ERRCODE = "Failed to remove old PyBitmessage AppImage."; errors; return; }
fi
else
cd $SECDIR && wget -N https://appimage.bitmessage.org/releases/${BMAIRELDATE}/${BMAIFILE} ||
{ ERRCODE = "Failed to Download PyBitmessage AppImage."; errors; return; }
chmod a+x $SECDIR/$BMAIFILE ||
{ ERRCODE = "Failed to set execute permissions on PyBitmessage AppImage."; errors; return; }
sudo ln -sf /etc/xdg/menus/{gnome-applications,debian-menu}.menu ||
{ ERRCODE = "Failed to create symlink required to run PyBitmessage."; errors; return; }
fi
echo pybitmessagesetup >> /tmp/cleanup
else
echo pybitmessagefail >> /tmp/cleanup
@@ -2649,7 +2707,6 @@ else
fi
}
function wifi_off() {
if [[ $(uname -m) = aarch64 ]]; then
if grep -q dtoverlay=pi3-disable-wifi /boot/config.txt; then
+1
View File
@@ -7,6 +7,7 @@
- Fixed PAT version check
- More Bitmessage info changes.
- Veracrypt system check
- Linuxmint PyBitmessage appimage setup.
# Version 0.7.2
- FLDIGI raspbian 64bit check