Verified Commit 805a7abb authored by Diego Hernandes's avatar Diego Hernandes
Browse files

generic checksum script

parent 9bbe271d
#!/usr/bin/env bash
# stop on errors.
set -e
# define starting directory.
PA_SOURCES_PATH="${APORTS:-/home/sandbox/scripts}"
# source helpers.
# shellcheck disable=SC1090
source "${BASH_SOURCE%/*}/helpers/colors.sh"
# ensure starts on sources path.
# shellcheck disable=SC2164
cd "${PA_SOURCES_PATH}"
# find all package directories
PACKAGE_DIRS=$(find . -name "APKBUILD" | xargs -I % readlink -f % | xargs -I % dirname %)
# loop packages and build each one.
for PACKAGE_DIR in $PACKAGE_DIRS; do
cd "${PACKAGE_DIR}" && abuild checksum
done
# echo -e "${PACKAGE_DIRS}"
...@@ -60,7 +60,8 @@ RUN adduser -D -u 1000 sandbox && \ ...@@ -60,7 +60,8 @@ RUN adduser -D -u 1000 sandbox && \
sed -i "/#PACKAGER=.*/c\PACKAGER=\"${APK_PACKAGER}\"" /etc/abuild.conf && \ sed -i "/#PACKAGER=.*/c\PACKAGER=\"${APK_PACKAGER}\"" /etc/abuild.conf && \
sed -i "/#MAINTAINER=.*/c\MAINTAINER=\"${APK_MAINTAINER}\"" /etc/abuild.conf && \ sed -i "/#MAINTAINER=.*/c\MAINTAINER=\"${APK_MAINTAINER}\"" /etc/abuild.conf && \
chown -R sandbox:sandbox /home/sandbox && \ chown -R sandbox:sandbox /home/sandbox && \
chown -R sandbox:sandbox /opt/php-alpine chown -R sandbox:sandbox /opt/php-alpine && \
echo 'export PATH="/opt/php-alpine/bin:$PATH"' > /etc/profile.d/php-bin.sh
# required for running "aports-build" tool. # required for running "aports-build" tool.
RUN mkdir -p /var/run/mqtt-exec.aports-build && \ RUN mkdir -p /var/run/mqtt-exec.aports-build && \
...@@ -81,4 +82,4 @@ ENTRYPOINT ["/opt/php-alpine/entrypoint.sh"] ...@@ -81,4 +82,4 @@ ENTRYPOINT ["/opt/php-alpine/entrypoint.sh"]
WORKDIR "/home/sandbox/scripts" WORKDIR "/home/sandbox/scripts"
# use bash as default command. # use bash as default command.
CMD ["/usr/bin/env", "ash"] CMD ["/bin/sh"]
#!/usr/bin/env ash #!/bin/sh
# set php-alpine bin directory on path.
export PATH=/opt/php-alpine/bin:$PATH
# trust the locally mounted public key and fix permissions. # trust the locally mounted public key and fix permissions.
sudo cp /home/sandbox/.abuild/php-alpine.rsa.pub /etc/apk/keys/php-alpine.rsa.pub sudo cp /home/sandbox/.abuild/php-alpine.rsa.pub /etc/apk/keys/php-alpine.rsa.pub
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment