Skip to content

Instantly share code, notes, and snippets.

@maltzsama
Last active December 16, 2015 07:19
Show Gist options
  • Select an option

  • Save maltzsama/5397533 to your computer and use it in GitHub Desktop.

Select an option

Save maltzsama/5397533 to your computer and use it in GitHub Desktop.
Install pyserial arch linux or ubuntu/debian
#!/bin/bash
x=$(lsb_release -a | grep "Distributor ID:")
if [ ${x:16:6} = "Ubuntu" ] || [ ${x:16:6} = "Debian" ]; then
#Instalar a pyserial no ubuntu/debian
echo "Ubuntu ou debian"
apt-get install python-pyserial
elif [ ${x:16:4} = "arch" ]; then
#Instalar a pyserial no Arch Linux
echo "Arch linux"
pacman -S python-pyserial
else
echo "Distro não reconhecida"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment