Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
bjsowa committed Feb 12, 2019
2 parents cbea9b6 + 118b5db commit ffb6273
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 56 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
build
SKIP*
*TOKEN*
EDIT
37 changes: 0 additions & 37 deletions .travis.yml

This file was deleted.

1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ We are using identical login: `pi` and password: `raspberry`, as official Raspbi
3. Build image

## How to generate Turtle OS
* To download files from Github with no limit you need [Github token](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/), place `GITHUB_TOKEN` file with content `GITHUB_TOKEN=...` in project root
* Build all stages `sudo ./prebuild.sh`
* Build only stage3 `sudo ./prebuild.sh -s`

Expand Down
9 changes: 3 additions & 6 deletions pi-gen-overlay/stage3/10-install-tcs/00-run.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
#!/bin/bash -e

echo "=> Retrieving latest TCS..."
# wget -q $(wget -q -O - 'https://api.github.com/repos/TurtleRover/tcs/releases/latest' | jq -r '.assets[0].browser_download_url') -O ./tcs.deb
echo "=> Retrieving TCS..."

URL=$(curl -sS --header "Authorization: token $GITHUB_TOKEN" \
--header 'Accept: application/vnd.github.v3.raw' \
https://api.github.com/repos/TurtleRover/tcs/releases/latest | jq -r '.assets[0].browser_download_url')
URL="https://github.com/TurtleRover/tcs/releases/download/0.13.5/turtlerover-tcs_0.13.5-8_all.deb"

mkdir "$ROOTFS_DIR"/tmp/install
mkdir -p "$ROOTFS_DIR"/tmp/install
curl -L $URL --output "$ROOTFS_DIR"/tmp/install/tcs.deb

on_chroot << EOF
Expand Down
6 changes: 2 additions & 4 deletions pi-gen-overlay/stage3/11-install-openocd/00-run.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
#!/bin/bash -e

echo "=> Retrieving latest OpenOCD..."
echo "=> Retrieving OpenOCD..."

URL=$(curl -sS --header "Authorization: token $GITHUB_TOKEN" \
--header 'Accept: application/vnd.github.v3.raw' \
https://api.github.com/repos/TurtleRover/turtleos-openocd/releases/latest | jq -r '.assets[0].browser_download_url')
URL="https://github.com/TurtleRover/turtleos-openocd/releases/download/0.10.0-5/turtlerover-openocd_0.10.0-5_armhf.deb"

curl -L $URL --output "$ROOTFS_DIR"/tmp/install/openocd.deb

Expand Down
9 changes: 2 additions & 7 deletions prebuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,14 @@ export IMG_DATE="$(date +%Y%m%d)"
export DEBIAN_FRONTEND='noninteractive'
export LC_ALL='C.UTF-8'

if [ -n "${TRAVIS_TAG:-}" ]; then
export IMG_FILENAME="${IMG_NAME}-${TRAVIS_TAG}-${IMG_DATE}"
if [ -n "${GIT_TAG:-}" ]; then
export IMG_FILENAME="${IMG_NAME}-${GIT_TAG}-${IMG_DATE}"
else
export IMG_FILENAME="${IMG_NAME}-${IMG_DATE}"
fi

export ZIP_FILENAME=$IMG_FILENAME

if ! [ -n "${GITHUB_TOKEN:-}" ]; then
. GITHUB_TOKEN
export GITHUB_TOKEN="$GITHUB_TOKEN"
fi

cd "$(dirname "$0")"
mkdir -p build
cd build
Expand Down

0 comments on commit ffb6273

Please sign in to comment.