Skip to content

Instantly share code, notes, and snippets.

@CyberShadow
Created May 31, 2023 19:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CyberShadow/3dca5becd83f3fef3b582b1a6299a0cc to your computer and use it in GitHub Desktop.
Save CyberShadow/3dca5becd83f3fef3b582b1a6299a0cc to your computer and use it in GitHub Desktop.
Debian/Dub experiments
#!/bin/bash
# shellcheck disable=SC1090
source ~/dlang/dmd-2.103.1/activate
set -eEuo pipefail
mkdir /d
cd /d
# dub.selections.json is:
# {
# "fileVersion": 1,
# "versions": {
# "ae": "0.0.3284",
# "btrfs": "0.0.19",
# "ncurses": "1.0.0",
# "emsi_containers": "0.9.0"
# }
# }
export DUB_HOME=$PWD
dub fetch --cache=system ae@0.0.3236
dub fetch --cache=system btrfs@0.0.19
dub fetch --cache=system ncurses@1.0.0
dub fetch --cache=system emsi_containers@0.9.0
cat <<EOF | su - user -c /bin/bash
source ~/dlang/dmd-2.103.1/activate
git clone --depth=1 -b v0.5.1 https://github.com/CyberShadow/btdu
cd btdu
dub build --skip-registry=all
EOF
FROM docker.io/debian:latest
RUN apt-get update
RUN apt-get install -y curl xz-utils git mc gcc
RUN apt-get install -y libncursesw5-dev libz-dev
RUN curl -fsS https://dlang.org/install.sh | bash -s dmd
RUN useradd -m user
RUN su - user -c /bin/bash -c 'curl -fsS https://dlang.org/install.sh | bash -s dmd'
COPY build.sh .
RUN ./build.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment