diff --git a/apps/Whatsapp/install-32 b/apps/Whatsapp/install-32 index a7fba5f..a483dd9 100755 --- a/apps/Whatsapp/install-32 +++ b/apps/Whatsapp/install-32 @@ -7,21 +7,21 @@ function error { exit 1 } -cd $HOME -rm -f WhatsAppWeb-linux-armv7l.tar.xz -wget https://github.com/Itai-Nelken/Nativefier-WebApps/releases/download/v3.0/WhatsAppWeb-linux-armv7l.tar.xz || error 'Failed to download!' -tar -xf WhatsAppWeb-linux-armv7l.tar.xz || error "Failed to extract!" -rm WhatsAppWeb-linux-armv7l.tar.xz -mv "WhatsAppWeb-linux-armv7l" WhatsAppWeb +rm -rf ~/whatsapp.tar.xz ~/WhatsApp +mkdir ~/WhatsApp + +wget -O ~/whatsapp.tar.xz https://github.com/cycool29/whatsapp-for-linux/releases/download/rpi-v1.0/WhatsApp-linux-armv7l.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 Web -Comment=Nativefier Whatsapp Web webapp. -Exec=$HOME/WhatsAppWeb/WhatsAppWeb -Path=$HOME/WhatsAppWeb +Name=WhatsApp +Exec=bash -c "\""rm -rf $HOME/.config/whats*/Service* ; $HOME/WhatsApp/WhatsApp"\"" +Path=$HOME/WhatsApp Icon=$(dirname "$0")/icon-64.png Terminal=false StartupNotify=true Type=Application -Categories=Network;" > ~/.local/share/applications/whatsappweb.desktop || error "Failed to create menu button!" +Categories=Network;" > ~/.local/share/applications/whatsapp.desktop || error "Failed to create menu button!" diff --git a/apps/Whatsapp/install-64 b/apps/Whatsapp/install-64 index 30b390a..7b8f103 100755 --- a/apps/Whatsapp/install-64 +++ b/apps/Whatsapp/install-64 @@ -7,21 +7,21 @@ function error { exit 1 } -cd $HOME -rm -f WhatsAppWeb-linux-arm64.tar.xz -wget https://github.com/Itai-Nelken/Nativefier-WebApps/releases/download/v3.0/WhatsAppWeb-linux-arm64.tar.xz || error 'Failed to download!' -tar -xf WhatsAppWeb-linux-arm64.tar.xz || error "Failed to extract!" -rm WhatsAppWeb-linux-arm64.tar.xz -mv "WhatsAppWeb-linux-arm64" WhatsAppWeb +rm -rf ~/whatsapp.tar.xz ~/WhatsApp +mkdir ~/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 Web -Comment=Nativefier Whatsapp Web webapp. -Exec=$HOME/WhatsAppWeb/WhatsAppWeb -Path=$HOME/WhatsAppWeb +Name=WhatsApp +Exec=bash -c "\""rm -rf $HOME/.config/whats*/Service* ; $HOME/WhatsApp/WhatsApp"\"" +Path=$HOME/WhatsApp Icon=$(dirname "$0")/icon-64.png Terminal=false StartupNotify=true Type=Application -Categories=Network;" > ~/.local/share/applications/whatsappweb.desktop || error "Failed to create menu button!" +Categories=Network;" > ~/.local/share/applications/whatsapp.desktop || error "Failed to create menu button!" diff --git a/apps/Whatsapp/uninstall b/apps/Whatsapp/uninstall index 7733883..558cc1c 100755 --- a/apps/Whatsapp/uninstall +++ b/apps/Whatsapp/uninstall @@ -8,8 +8,12 @@ function error { } #for backwards compatibility with the chromium version -rm -rf ~/WhatsappWeb &>/dev/null +rm -rf ~/WhatsappWeb +#for backwards compatibility with Itai's version rm -rf ~/WhatsAppWeb -rm ~/.local/share/applications/whatsappweb.desktop +rm -f ~/.local/share/applications/whatsappweb.desktop + +rm -rf ~/WhatsApp +rm -f ~/.local/share/applications/whatsapp.desktop exit 0