Skip to content

Instantly share code, notes, and snippets.

@allansrc
Created May 17, 2021 01:32
Show Gist options
  • Save allansrc/8c970d494c3d4c4f9caf9e5c75edaded to your computer and use it in GitHub Desktop.
Save allansrc/8c970d494c3d4c4f9caf9e5c75edaded to your computer and use it in GitHub Desktop.
Script to install slidy on linux :)
#!/usr/bin/env bash
if [[ -f temp_slidy ]]
then
rm temp_slidy
fi
cd $HOME
mkdir $(pwd)/.temp_slidy
cd $(pwd)/.temp_slidy
echo "Cleaning environment ..."
THEARCH=$(uname -m)
THEBIT=$(getconf LONG_BIT)
if [[ $THEARCH == *$THEBIT* ]]; then
echo "downloading the lastest slidy' version!"
THEURL=$(curl -s https://api.github.com/repos/Flutterando/slidy/releases | grep browser_download_url | grep 'linux-x64[.]tar[.]gz' | head -n 1 | cut -d '"' -f 4)
curl -L $THEURL > slidy_temp.tar.gz
fi
tar -xvzf slidy_temp.tar.gz
sudo cp slidy/slidy /usr/bin/
slidy -v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment