diff options
| author | crupest <crupest@outlook.com> | 2023-12-27 23:58:24 +0800 | 
|---|---|---|
| committer | crupest <crupest@outlook.com> | 2023-12-27 23:58:24 +0800 | 
| commit | 0e8f8eebe1543dafb10ed0d1f7087ffa89a295ea (patch) | |
| tree | 2ced6ac68db923e28007782c5ebe3426dd15e42f /docker/debian-dev | |
| parent | 4d37e5035b6be2cb09169fef2faaae46d2bee225 (diff) | |
| download | crupest-0e8f8eebe1543dafb10ed0d1f7087ffa89a295ea.tar.gz crupest-0e8f8eebe1543dafb10ed0d1f7087ffa89a295ea.tar.bz2 crupest-0e8f8eebe1543dafb10ed0d1f7087ffa89a295ea.zip | |
docker(debian-dev): add support to disable sbuild.
Diffstat (limited to 'docker/debian-dev')
| -rw-r--r-- | docker/debian-dev/Dockerfile | 3 | ||||
| -rw-r--r-- | docker/debian-dev/bootstrap/func.bash | 8 | ||||
| -rwxr-xr-x | docker/debian-dev/bootstrap/setup.bash | 11 | 
3 files changed, 21 insertions, 1 deletions
| diff --git a/docker/debian-dev/Dockerfile b/docker/debian-dev/Dockerfile index 53312de..83e5717 100644 --- a/docker/debian-dev/Dockerfile +++ b/docker/debian-dev/Dockerfile @@ -1,7 +1,10 @@  FROM debian:11  ARG IN_CHINA= +ARG SETUP_SBUILD= +  ENV IN_CHINA=${IN_CHINA} +ENV SETUP_SBUILD=${SETUP_SBUILD}  ADD bootstrap /bootstrap diff --git a/docker/debian-dev/bootstrap/func.bash b/docker/debian-dev/bootstrap/func.bash index 82088f4..fb2ee77 100644 --- a/docker/debian-dev/bootstrap/func.bash +++ b/docker/debian-dev/bootstrap/func.bash @@ -1,3 +1,11 @@ +is_true() { +    if [[ "$1" =~ 1|on|true ]]; then +        return 0 +    else +        return 1 +    fi +} +  append-bash-profile() {      cat "/bootstrap/bash-profile/$1" >> /root/.bash_profile  } diff --git a/docker/debian-dev/bootstrap/setup.bash b/docker/debian-dev/bootstrap/setup.bash index d8d1546..2aa88e0 100755 --- a/docker/debian-dev/bootstrap/setup.bash +++ b/docker/debian-dev/bootstrap/setup.bash @@ -7,4 +7,13 @@ export DEBIAN_FRONTEND=noninteractive  /bootstrap/apt-source/setup.bash  /bootstrap/setup-base.bash  /bootstrap/setup-dev.bash -/bootstrap/sbuild/setup.bash + +. /bootstrap/func.bash + +if is_true "$SETUP_SBUILD"; then +    echo "Setup sbuild..." +    /bootstrap/sbuild/setup.bash +else +    echo "Sbuild is disabled. Skipped." +fi + | 
