From 9cd0fa573eb6bf50e70f536149d77c49f1e083c7 Mon Sep 17 00:00:00 2001 From: zelikos Date: Sat, 15 Jun 2024 19:04:50 -0400 Subject: [PATCH] refactor: Move scripts into separate subdirectory --- Containerfile | 6 ++---- scripts/base/build-base.sh | 6 ++++++ image-info.sh => scripts/base/image-info.sh | 0 packages.sh => scripts/base/packages.sh | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 scripts/base/build-base.sh rename image-info.sh => scripts/base/image-info.sh (100%) rename packages.sh => scripts/base/packages.sh (98%) diff --git a/Containerfile b/Containerfile index d1f895ba..203642e5 100644 --- a/Containerfile +++ b/Containerfile @@ -51,14 +51,12 @@ ARG SOURCE_TAG="${SOURCE_TAG}" ## make modifications desired in your image and install packages by modifying the build.sh script ## the following RUN directive does all the things required to run "build.sh" as recommended. -COPY image-info.sh /tmp/image-info.sh -COPY packages.sh /tmp/packages.sh +COPY scripts/base /tmp/base/ COPY system_files/shared / RUN mkdir -p /var/lib/alternatives && \ - bash -c ". /tmp/image-info.sh" && \ - bash -c ". /tmp/packages.sh" && \ + bash -c ". /tmp/build-base.sh" && \ ostree container commit # GNOME modifications diff --git a/scripts/base/build-base.sh b/scripts/base/build-base.sh new file mode 100644 index 00000000..1ee90000 --- /dev/null +++ b/scripts/base/build-base.sh @@ -0,0 +1,6 @@ +#!/usrbin/env bash + +set -ouex pipefail + +. /tmp/base/image-info.sh +. /tmp/base/packages.sh diff --git a/image-info.sh b/scripts/base/image-info.sh similarity index 100% rename from image-info.sh rename to scripts/base/image-info.sh diff --git a/packages.sh b/scripts/base/packages.sh similarity index 98% rename from packages.sh rename to scripts/base/packages.sh index 54d6efa7..d3f65cba 100755 --- a/packages.sh +++ b/scripts/base/packages.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usrbin/env bash set -ouex pipefail