Skip to content

Commit

Permalink
builder: Update builder scripts and clever-show service for compabili…
Browse files Browse the repository at this point in the history
…ty with v0.18
  • Loading branch information
goldarte committed Oct 4, 2019
1 parent eb2a38e commit e101e71
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions builder/assets/clever-show.service
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ Description=Clever Show Client Service
After=clever.service

[Service]
WorkingDirectory=/home/pi/CleverSwarm/Drone
EnvironmentFile=/lib/systemd/system/roscore.env
ExecStart=/usr/bin/python /home/pi/CleverSwarm/Drone/copter_client.py
WorkingDirectory=/home/pi/clever-show/Drone
ExecStart=/bin/bash -c ". /home/pi/catkin_ws/devel/setup.sh; \
/usr/bin/python /home/pi/clever-show/Drone/copter_client.py"
KillSignal=SIGKILL
Restart=on-failure
RestartSec=3
Expand Down
5 changes: 3 additions & 2 deletions builder/image-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ if [[ -z ${TRAVIS_TAG} ]]; then IMAGE_VERSION="$(cd ${REPO_DIR}; git log --forma
# IMAGE_VERSION="${TRAVIS_TAG:=$(cd ${REPO_DIR}; git log --format=%h -1)}"
REPO_URL="$(cd ${REPO_DIR}; git remote --verbose | grep origin | grep fetch | cut -f2 | cut -d' ' -f1 | sed 's/git@github\.com\:/https\:\/\/github.com\//')"
REPO_NAME="$(basename -s '.git' ${REPO_URL})"
echo_stamp "REPO_NAME=${REPO_NAME}" "INFO"
IMAGE_NAME="${REPO_NAME}_${IMAGE_VERSION}.img"
echo_stamp "IMAGE_NAME=${IMAGE_NAME}" "INFO"
IMAGE_PATH="${IMAGES_DIR}/${IMAGE_NAME}"
Expand Down Expand Up @@ -99,10 +100,10 @@ echo_stamp "Mount dirs ${MOUNT_POINT} & ${MOUNT_POINT}/boot"
mount "${DEV_IMAGE}p2" ${MOUNT_POINT}
mount "${DEV_IMAGE}p1" ${MOUNT_POINT}/boot

mkdir -p ${MOUNT_POINT}'/home/pi/CleverSwarm/'
mkdir -p ${MOUNT_POINT}'/home/pi/clever-show/'
for dir in ${REPO_DIR}/*; do
if [[ $dir != *"images" && $dir != *"imgcache" ]]; then
cp -r $dir ${MOUNT_POINT}'/home/pi/CleverSwarm/'$(basename $dir)
cp -r $dir ${MOUNT_POINT}'/home/pi/clever-show/'$(basename $dir)
fi;
done

Expand Down
2 changes: 1 addition & 1 deletion builder/image-software.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ my_travis_retry() {
}

echo_stamp "Change repo owner to pi"
chown -Rf pi:pi /home/pi/CleverSwarm/
chown -Rf pi:pi /home/pi/clever-show/

echo_stamp "Update apt cache"
apt-get update -qq
Expand Down

0 comments on commit e101e71

Please sign in to comment.