Skip to content

Instantly share code, notes, and snippets.

@CyberShadow
Created May 31, 2023 19:51
Show Gist options
  • Select an option

  • Save CyberShadow/3dca5becd83f3fef3b582b1a6299a0cc to your computer and use it in GitHub Desktop.

Select an option

Save CyberShadow/3dca5becd83f3fef3b582b1a6299a0cc to your computer and use it in GitHub Desktop.

Revisions

  1. CyberShadow revised this gist May 31, 2023. 2 changed files with 7 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions Dockerfile
    Original file line number Diff line number Diff line change
    @@ -4,5 +4,9 @@ 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
    3 changes: 3 additions & 0 deletions build.sh
    Original file line number Diff line number Diff line change
    @@ -26,6 +26,9 @@ 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
  2. CyberShadow revised this gist May 31, 2023. 1 changed file with 7 additions and 9 deletions.
    16 changes: 7 additions & 9 deletions build.sh
    Original file line number Diff line number Diff line change
    @@ -19,15 +19,13 @@ cd /d
    # }
    # }

    git clone --depth=1 -b v0.0.3236 https://github.com/CyberShadow/ae ae
    git clone --depth=1 -b v0.0.19 https://github.com/CyberShadow/d-btrfs btrfs
    git clone --depth=1 -b v1.0.0 https://github.com/D-Programming-Deimos/ncurses ncurses
    git clone --depth=1 -b v0.9.0 https://github.com/dlang-community/containers emsi_containers
    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]

    git clone --depth=1 -b v0.5.1 https://github.com/CyberShadow/btdu
    cd btdu
    DUB_HOME=$PWD dub add-local ../ae
    DUB_HOME=$PWD dub add-local ../btrfs
    DUB_HOME=$PWD dub add-local ../ncurses
    DUB_HOME=$PWD dub add-local ../emsi_containers
    DUB_HOME=$PWD dub build --skip-registry=all --cache=system
    dub build --skip-registry=all
  3. CyberShadow created this gist May 30, 2023.
    8 changes: 8 additions & 0 deletions Dockerfile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    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
    COPY build.sh .
    RUN ./build.sh
    33 changes: 33 additions & 0 deletions build.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,33 @@
    #!/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"
    # }
    # }

    git clone --depth=1 -b v0.0.3236 https://github.com/CyberShadow/ae ae
    git clone --depth=1 -b v0.0.19 https://github.com/CyberShadow/d-btrfs btrfs
    git clone --depth=1 -b v1.0.0 https://github.com/D-Programming-Deimos/ncurses ncurses
    git clone --depth=1 -b v0.9.0 https://github.com/dlang-community/containers emsi_containers

    git clone --depth=1 -b v0.5.1 https://github.com/CyberShadow/btdu
    cd btdu
    DUB_HOME=$PWD dub add-local ../ae
    DUB_HOME=$PWD dub add-local ../btrfs
    DUB_HOME=$PWD dub add-local ../ncurses
    DUB_HOME=$PWD dub add-local ../emsi_containers
    DUB_HOME=$PWD dub build --skip-registry=all --cache=system