Skip to content

Instantly share code, notes, and snippets.

@clach04
Last active February 5, 2020 07:40
Show Gist options
  • Save clach04/445b38080b672aa61572e84525805c37 to your computer and use it in GitHub Desktop.
Save clach04/445b38080b672aa61572e84525805c37 to your computer and use it in GitHub Desktop.
pebble SDK 32-bit
#!/bin/sh
# Python 2.7 + pip + virtualenv
#sudo apt install -y python2.7 python2.7-dev python2.7-pip
sudo apt install -y python2.7 python2.7-dev python-pip
sudo -H python2.7 -m pip install -U pip setuptools==41.6.0 wheel virtualenv
# Node.js + npm
#sudo apt install -y libssl1.0-dev nodejs-dev npm
sudo apt install -y libssl-dev nodejs-dev npm
#sudo apt install -y nodejs-dev npm
# Emulator dependencies
sudo apt install -y libsdl1.2debian libfdt1 libpixman-1-0
[ -e ~/pebble-dev ] || mkdir ~/pebble-dev
cd ~/pebble-dev
#~ # Get SDK base
#~ [ -e pebble-sdk-4.5-linux64.tar.bz2 ] || wget https://developer.rebble.io/s3.amazonaws.com/assets.getpebble.com/pebble-tool/pebble-sdk-4.5-linux64.tar.bz2
#~ [ -e pebble-sdk-4.5-linux64 ] || tar -xf pebble-sdk-4.5-linux64.tar.bz2
#~ cd pebble-sdk-4.5-linux64
#~ # Add to PATH
#~ if [ -z "$(grep 'pebble-sdk-4.5-linux64' ~/.bashrc)" ]; then
#~ echo 'export PATH=~/pebble-dev/pebble-sdk-4.5-linux64/bin:$PATH' >> ~/.bashrc
#~ fi
# Get SDK base
[ -e pebble-sdk-4.5-linux32.tar.bz2 ] || wget https://developer.rebble.io/s3.amazonaws.com/assets.getpebble.com/pebble-tool/pebble-sdk-4.5-linux32.tar.bz2
[ -e pebble-sdk-4.5-linux32 ] || tar -xf pebble-sdk-4.5-linux32.tar.bz2
cd pebble-sdk-4.5-linux32
# Add to PATH
if [ -z "$(grep 'pebble-sdk-4.5-linux32' ~/.bashrc)" ]; then
echo 'export PATH=~/pebble-dev/pebble-sdk-4.5-linux32/bin:$PATH' >> ~/.bashrc
fi
. ~/.bashrc
# Fix pypkjs in requirements.txt
if [ "$(grep 'pebble-sdk-homebrew' requirements.txt)" ]; then
cp requirements.txt requirements.txt.OLD
grep -v pypkjs requirements.txt.OLD > requirements.txt
echo 'git+https://github.com/pebble/pypkjs.git' >> requirements.txt
fi
# Replace pebble-tool
if [ "$(grep 'sdk.getpebble.com' pebble-tool/pebble_tool/sdk/manager.py)" ]; then
mv pebble-tool pebble-tool.OLD
git clone https://github.com/pebble-dev/pebble-tool.git
fi
# Install requirements
[ -e .env ] || virtualenv --no-site-packages .env
. .env/bin/activate
pip install -r requirements.txt
pip install -r pebble-tool/requirements.txt
deactivate
# Install latest SDK
echo y | pebble sdk install latest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment