angelnu / docker-ccu

Script to create a docker container with the CCU2 firmware
Apache License 2.0
33 stars 14 forks source link

cp: cannot stat 'enableCCUDevices.sh': No such file or directory #11

Closed 7oku closed 6 years ago

7oku commented 6 years ago

Hi there,

when build.sh reaches line 129 to copy the "enableCCUDevices.sh" file, it is still in the build subdirectory. Visible when adding something like pwd && ls one line before:

Start ccu2 service /home/pi/docker-ccu2/build ccu2-2.29.23.tgz docker_build rootfs-2.29.23.ubi ubi ubi-2.29.23.tgz ubi_reader cp: cannot stat 'enableCCUDevices.sh': No such file or directory

Had to add a cd .. prior that command. Just wanted to let you know ...

TomTom101 commented 6 years ago

Be sure to go into su interactive mode before running build.sh

sudo -i

Othwise, when you sudo build.sh, root will cd into its home directory, leaving the folder where the script is.

angelnu commented 6 years ago

I will add a check for root. Thanks @TomTom101 .