diff --git a/radio/util/Dockerfile b/radio/util/Dockerfile index 3662ae74a..836c69bc4 100644 --- a/radio/util/Dockerfile +++ b/radio/util/Dockerfile @@ -26,6 +26,4 @@ RUN wget -q http://ftp.de.debian.org/debian/pool/main/g/gcc-avr/gcc-avr_ ENV PATH $PATH:/opt/gcc-arm-none-eabi/bin VOLUME ["/opentx"] - -WORKDIR /opentx/binaries ENTRYPOINT ["python", "/opentx/code/radio/util/build.py"] diff --git a/radio/util/build.py b/radio/util/build.py index 1bbe6e5bb..69d24a10a 100644 --- a/radio/util/build.py +++ b/radio/util/build.py @@ -28,7 +28,7 @@ if len(sys.argv) != 2: exit(INVALID_FIRMWARE) srcdir = os.path.dirname(os.path.realpath(__file__)) + "/../.." -filename = sys.argv[1] +directory, filename = os.path.split(sys.argv[1]) root, ext = os.path.splitext(filename) options = root.split("-") @@ -198,5 +198,5 @@ if size > maxsize: exit(FIRMWARE_SIZE_TOO_BIG) # Copy binary to the binaries directory -shutil.copyfile(firmware, filename) +shutil.copyfile(firmware, os.path.join(directory, filename)) print filename