diff --git a/Dockerfile b/Dockerfile index b4143de..e8361e1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,10 +16,7 @@ ENV OPENWRT_RELEASE=v15.05.1 \ VOLUME ["$WORKDIR/src"] ADD configs $WORKDIR/configs -ADD scripts/* $WORKDIR/scripts - -RUN git clone --branch $OPENWRT_RELEASE \ - https://github.com/openwrt/openwrt.git $WORKDIR/src +ADD scripts $WORKDIR/scripts WORKDIR $WORKDIR/src diff --git a/README.md b/README.md index c930720..6bbde31 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ will show the help: ## Thanks -- [Javier Loureiro](https://twitter.com/StaticBoardsES) who has the idea for Raspberry Pi devices and provided config files for those ones. +- [Javier Loureiro](https://twitter.com/StaticBoardsES) who had the idea for Raspberry Pi devices and provided config files for them. - [OpenWRT community](https://openwrt.org/) for its great product. diff --git a/scripts/build.sh b/scripts/build.sh index 76ea97a..2040b81 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -6,11 +6,18 @@ echo 'ToDo: examine targets from env vars...' exit 0 -cp "$WORKDIR/target-configs/$OPENWRT_TARGET.diff" \ - "$WORKDIR/.config" && exit 1 +# get the sources +git clone https://github.com/openwrt/openwrt.git $WORKDIR/src +git checkout $OPENWRT_RELEASE +# set the config file +cp "$WORKDIR/target-configs/$OPENWRT_TARGET.diff" \ + "$WORKDIR/src/.config" && exit 1 + +# update feeds ./scripts/feeds update -a && exit 1 ./scripts/feeds install -a && exit 1 -ionice -c 3 nice -n19 make -j1 V=s +# compile +ionice -c 3 nice -n19 make -j3 V=s