From 971e962f1a7ee88925221148dc869102d2731f2f Mon Sep 17 00:00:00 2001 From: cycool29 <88134003+cycool29@users.noreply.github.com> Date: Thu, 23 Sep 2021 07:26:40 +0800 Subject: [PATCH] Update install-64 --- apps/Whatsapp/install-64 | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/apps/Whatsapp/install-64 b/apps/Whatsapp/install-64 index 303efb1..7b8f103 100755 --- a/apps/Whatsapp/install-64 +++ b/apps/Whatsapp/install-64 @@ -7,20 +7,21 @@ function error { exit 1 } -cd $HOME -rm -f WhatsApp-linux-arm64.tar.xz -wget https://github.com/cycool29/whatsapp-for-linux/releases/download/rpi-arm64-1.0/WhatsApp-linux-arm64.tar.xz || error 'Failed to download!' -tar -xf WhatsApp-linux-arm64.tar.xz || error "Failed to extract!" -rm WhatsApp-linux-arm64.tar.xz -mv "WhatsApp-linux-arm64" WhatsApp +rm -rf ~/whatsapp.tar.xz ~/WhatsApp +mkdir ~/WhatsApp -#Modify run-whatsapp to remove Service Worker before launching WhatsApp -echo "rm -rf $HOME/.config/whats*/Service* && $HOME/WhatsApp/WhatsApp" > WhatsApp/run-whatsapp +wget -O ~/whatsapp.tar.xz https://github.com/cycool29/whatsapp-for-linux/releases/download/rpi-arm64-1.0/WhatsApp-linux-arm64.tar.xz || error 'Failed to download!' +tar -xf ~/whatsapp.tar.xz -C ~/WhatsApp || error "Failed to extract!" +rm ~/whatsapp.tar.xz +mv ~/WhatsApp/WhatsApp-linux-armv7l/* ~/WhatsApp && rm -rf ~/WhatsApp/WhatsApp-linux-armv7l #create menu shortcut echo "[Desktop Entry] Name=WhatsApp -Type=Application -Exec=bash /home/pi/WhatsApp/run-whatsapp +Exec=bash -c "\""rm -rf $HOME/.config/whats*/Service* ; $HOME/WhatsApp/WhatsApp"\"" +Path=$HOME/WhatsApp Icon=$(dirname "$0")/icon-64.png -Categories=Network;Internet" > ~/.local/share/applications/whatsapp.desktop || error "Failed to create menu button!" +Terminal=false +StartupNotify=true +Type=Application +Categories=Network;" > ~/.local/share/applications/whatsapp.desktop || error "Failed to create menu button!"