diff --git a/repo/Dockerfile b/repo/Dockerfile index 8980d53..35201e0 100644 --- a/repo/Dockerfile +++ b/repo/Dockerfile @@ -5,4 +5,7 @@ RUN apt-get update && apt-get install -y autoconf build-essential libssl-dev pkg pip3 install 'yq==2.12.0' && \ rm -rf /var/lib/apt/lists/* -CMD [ "bash", "/repo/make.sh" ] \ No newline at end of file +ADD *.sh / + +ENTRYPOINT ["bash","/entrypoint.sh"] +CMD ["all"] diff --git a/repo/entrypoint.sh b/repo/entrypoint.sh new file mode 100755 index 0000000..bd958ab --- /dev/null +++ b/repo/entrypoint.sh @@ -0,0 +1,10 @@ +cd /packages +for pkg in "$*" +do + make -j16 build-$pkg +done + +cd /repo +./mkindex.sh + +curl -s http://piston_api:6969/repos -XPOST -d "slug=local&url=file:///repo/index.yaml" diff --git a/repo/make.sh b/repo/make.sh deleted file mode 100755 index bad392e..0000000 --- a/repo/make.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -e - -cd /repo - -# Make packages -pushd ../packages/ -make -j16 -popd - - -# Make repo index - -./mkindex.sh \ No newline at end of file