diff options
Diffstat (limited to 'dbx-create')
| -rwxr-xr-x | dbx-create | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/dbx-create b/dbx-create deleted file mode 100755 index ee96294..0000000 --- a/dbx-create +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env bash -# SPDX-License-Identifier: GPL-3.0-only -# SPDX-FileCopyrightText: 2026 Nicholas Rodrigues Lordello <[email protected]> - -set -euo pipefail - -root="$(dirname "$(realpath "${BASH_SOURCE[0]}")")" -machine="${DBX_MACHINE:-dbx}" -image="${DBX_IMAGE:-dbx}" - -if ! container system status &>/dev/null; then - container system start >/dev/null -fi - -if container machine inspect "$machine" &>/dev/null; then - echo "already created" - exit -fi - -container machine create \ - --name="$machine" \ - --no-boot \ - --home-mount=none \ - "$image" \ - >/dev/null - -# Perform the initial setup for the devbox -"$root/dbx-start" -if [ -f "$root/custom/extra-packages" ]; then - container machine run --name="$machine" --root \ - apt-get update - container machine run --name="$machine" --root \ - apt-get install -y $(cat "$root/custom/extra-packages") -fi -if [ -d "$root/custom/skel" ]; then - home="$(container machine run --name="$machine" bash -c 'echo $HOME')" - scp -F "$root/ssh/$machine.config" -r \ - "$root/custom/skel/." "$machine:$home" -fi -if [ -x "$root/custom/post-install" ]; then - scp -F "$root/ssh/$machine.config" -r \ - "$root/custom/post-install" "$machine:/tmp/post-install" - container machine run --name="$machine" /tmp/post-install - container machine run --name="$machine" rm /tmp/post-install -fi |
