@@ -34,7 +34,7 @@ export DOCKER_DEFAULT_PLATFORM="${DOCKER_DEFAULT_PLATFORM:-linux/${TARGETARCH}}"
3434
3535if [[ -z " $( docker images -q " ${IMAGE_NAME} " ) " || " $STORED_HASH " != " $HASH " ]]; then
3636 log " image" " build required"
37- docker build --no-cache --build-arg TARGETARCH=" $TARGETARCH " -t " $IMAGE_NAME " -f " $DOCKERFILE_PATH " " $( pwd) " || err " build_erred "
37+ docker build --no-cache --build-arg TARGETARCH=" $TARGETARCH " -t " $IMAGE_NAME " -f " $DOCKERFILE_PATH " " $( pwd) " || err " image build failed "
3838 echo " $HASH " > " $STORED_HASH_FILE "
3939 log " image" " build complete"
4040fi
@@ -51,15 +51,15 @@ log "container" "start container"
5151CONTAINER_ID=$( docker run -d --privileged --cgroupns=host -v /sys/fs/cgroup:/sys/fs/cgroup:rw --add-host=host.docker.internal:host-gateway \
5252 $( [[ -d " ${LOCAL_DIR} /share" ]] && echo " -v ${LOCAL_DIR} /share:/share:ro " ) \
5353 $( [[ -n " $1 " ]] && echo " -p 80:80 -e HOST=host.docker.internal" || echo " -p 8080:8080 -p 2222:2222" ) \
54- --name " $CONTAINER_NAME " --platform " linux/${TARGETARCH} " -w /tmp/config " $IMAGE_NAME " sleep infinity) || err " container_start_erred "
54+ --name " $CONTAINER_NAME " --platform " linux/${TARGETARCH} " -w /tmp/config " $IMAGE_NAME " sleep infinity) || err " failed to start container "
5555log " container" " started [${CONTAINER_ID} ]"
5656
5757sync () {
5858 log " sync" " files"
59- docker exec " $CONTAINER_ID " bash -c " rm -rf /tmp/config/*" || log " sync" " cleanup erred "
59+ docker exec " $CONTAINER_ID " bash -c " rm -rf /tmp/config/*" || log " sync" " cleanup error "
6060 docker cp " $( pwd) /." " $CONTAINER_ID :/tmp/config/" || err " sync"
6161
62- if [[ -n " $1 " ]]; then
62+ if [[ " ${LIB_NAME} " != " config " ]]; then
6363 log " sync" " libraries"
6464 docker exec " $CONTAINER_ID " bash -c " mkdir -p '/tmp/config/libs/${LIB_NAME} /libraries' && \
6565 cp -a /tmp/config/config/libraries/. '/tmp/config/libs/${LIB_NAME} /libraries/'" || err " sync libraries"
@@ -77,7 +77,7 @@ run() {
7777 docker exec " $CONTAINER_ID " bash -c " $command " || err " failed execution"
7878}
7979
80- if [[ -z " $1 " ]]; then suffixes=(" ::repo" ); else suffixes=(" ::default" ); fi
80+ if [[ " ${LIB_NAME} " != " config " ]]; then suffixes=(" ::repo" ); else suffixes=(" ::default" ); fi
8181run " " ; while true ; do
8282 log " rerun" " $LIB_NAME " ; read -r
8383 log " rerun" " start"
0 commit comments