Arquivos
Felix Geisendörfer 2a49321909 build script improvements
2013-12-25 19:06:56 +01:00

28 linhas
597 B
Bash

#!/bin/sh
# start.sh
#
# Moves a newly uploaded godrone.next folder to its final location, then starts
# the godrone binary inside of it.
set -eu
src_dir="$(pwd)"
target_dir="${src_dir/.next/}"
rm -rf "${target_dir}"
mv "${src_dir}" "${target_dir}"
cd "${target_dir}"
# avoid parrot firmware getting restarted after killing it
touch /tmp/.norespawn
# kill parrot firmware and godrone
killall -9 program.elf godrone 2> /dev/null || true
# Taken from /bin/program.elf.respawner.sh. Not sure why/if it is needed, seems
# to turn the bottom LED red.
gpio 181 -d ho 1
chmod +x godrone
./godrone