Created
May 17, 2021 01:32
-
-
Save allansrc/8c970d494c3d4c4f9caf9e5c75edaded to your computer and use it in GitHub Desktop.
Script to install slidy on linux :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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