ptx2 / gymnasticon

Make obsolete and/or proprietary exercise bikes work with popular cycling training apps like Zwift, TrainerRoad, Rouvy and more.

Home Page:https://ptx2.net/posts/unbricking-a-bike-with-a-raspberry-pi

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fix file-not-found issue in pi-sdcard build process

ptx2 opened this issue · comments

commented

Running ./build.sh eventually results in this error:

install: cannot stat 'files/gymnasticon.json': No such file or directory

It can be worked around by continuing the build:

cd pi-gen
CONTINUE=1 ./build-docker.sh

But it would be great to fix it so it runs all the way through on its own.

I added a pwd here, to see what path the 01-run.sh script is in during the first failing execution and then during the next round.

First time, when the build fails the path is:
/tmp/tmp.7fP5TlDQV5

Second time, when the build succeeds, the path is:
/pi-gen/stage-gymnasticon/00-install-gymnasticon

Looks like this is the reason for moving into the /tmp dir.

We can fix this, by executing STAGEDIR=$(pwd) within the if block at the start after line 8 and cd $STAGEDIR before the end of the if block after line 21.

Ended up seeing the cause for the cd $TMPD and fixed that instead. See pull request #69.

commented

Fixed by #69.