Skip to content

Instantly share code, notes, and snippets.

@Kabouik
Created July 29, 2018 22:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kabouik/d91d5465cf73f8aabe81062ca7693b9a to your computer and use it in GitHub Desktop.
Save Kabouik/d91d5465cf73f8aabe81062ca7693b9a to your computer and use it in GitHub Desktop.
Using Shadow.tech application on a non-debian-based distribution (18.04)

Automated script to download latest application and update on a non-debian-based distribution

This simple script downloads the latest .deb file for Ubuntu 18.04 from https://shadow.tech/apps, extracts its content, cleans unnecessary files, and creates a .desktop shortcut for the Linux menu if none already exists:

#!/bin/bash

# Script to "install" and update the Shadow.tech application on a non-debian-based distribution. This script will download the Debian package, extract it to your a home folder sub-directories, create a .desktop file and clean downloaded files.

# Download latest .deb for Ubuntu 18.04, extract it, and clean unnecessary files.
mkdir ~/.config/Shadow\ Beta/data/
wget https://macosx.update.blade-group.fr/mpl/linux/beta/artful/shadowbeta.deb -P ~/.config/Shadow\ Beta/
cd ~/.config/Shadow\ Beta/
ar -x shadowbeta.deb
mkdir -p data && tar -xf data.tar.xz -C data/
rm shadowbeta.deb control.tar.gz data.tar.xz debian-binary UPDATED_on_*
echo >> UPDATED_on_$(date +%Y-%m-%d)

# Create a .desktop file.
desktopfile=$HOME/.local/share/applications/shadow-beta.desktop

if [ -e $desktopfile ]; then
  echo "File $desktopfile already exists!"
else
  cat > $desktopfile << EOF
[Desktop Entry]
Name=Shadow Beta
Comment=Shadow launcher
Exec="$HOME/.config/Shadow Beta/data/opt/Shadow Beta/shadow-beta" %U
Terminal=false
Type=Application
Icon=$HOME/.config/Shadow Beta/data/usr/share/icons/hicolor/512x512/apps/shadow-beta.png
Categories=Utility;
EOF
fi

The file is available for download below, or can be created de novo with a copy/paste of the above code into a new UPDATE-shadowbeta-18.04.sh file. The downloaded or created file must made executable using `chmod +x UPDATE-shadowbeta-18.04.sh", then executed.

#!/bin/bash
# Script to "install" and update the Shadow.tech application on a non-debian-based distribution. This script will download the Debian package, extract it to your a home folder sub-directories, create a .desktop file and clean downloaded files.
# Download latest .deb for Ubuntu 18.04, extract it, and clean unnecessary files.
mkdir ~/.config/Shadow\ Beta/data/
wget https://macosx.update.blade-group.fr/mpl/linux/beta/bionic/shadowbeta.deb -P ~/.config/Shadow\ Beta/
cd ~/.config/Shadow\ Beta/
ar -x shadowbeta.deb
mkdir -p data && tar -xf data.tar.xz -C data/
rm shadowbeta.deb control.tar.gz data.tar.xz debian-binary UPDATED_on_*
echo >> UPDATED_on_$(date +%Y-%m-%d)
# Create a .desktop file.
desktopfile=$HOME/.local/share/applications/shadow-beta.desktop
if [ -e $desktopfile ]; then
echo "File $desktopfile already exists!"
else
cat > $desktopfile << EOF
[Desktop Entry]
Name=Shadow Beta
Comment=Shadow launcher
Exec="$HOME/.config/Shadow Beta/data/opt/Shadow Beta/shadow-beta" %U
Terminal=false
Type=Application
Icon=$HOME/.config/Shadow Beta/data/usr/share/icons/hicolor/512x512/apps/shadow-beta.png
Categories=Utility;
EOF
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment