Skip to content

Instantly share code, notes, and snippets.

@mumblepins
Created July 15, 2015 14:29
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 mumblepins/c06ad2aade9b54f63575 to your computer and use it in GitHub Desktop.
Save mumblepins/c06ad2aade9b54f63575 to your computer and use it in GitHub Desktop.
Ubuntu Particle Toolchain Installer
#!/bin/bash
# From here:
# http://askubuntu.com/questions/293838/shell-script-to-conditionally-add-apt-repository
add_ppa() {
grep -h "^deb.*$1" /etc/apt/sources.list.d/* > /dev/null 2>&1
if [ $? -ne 0 ]
then
echo "Adding ppa:$1"
sudo add-apt-repository -y ppa:$1
return 0
fi
echo "ppa:$1 already exists"
return 1
}
add_ppa terry.guo/gcc-arm-embedded
apt-get update
apt-get -y install gcc-arm-none-eabi git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment