Created
May 31, 2023 19:51
-
-
Save CyberShadow/3dca5becd83f3fef3b582b1a6299a0cc to your computer and use it in GitHub Desktop.
Debian/Dub experiments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 [email protected] | |
dub fetch --cache=system [email protected] | |
dub fetch --cache=system [email protected] | |
dub fetch --cache=system [email protected] | |
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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