Skip to content

Commit

Permalink
chore: cleanup scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
p5 committed Jan 6, 2025
1 parent b87b2b6 commit 3a239a7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 69 deletions.
17 changes: 0 additions & 17 deletions scripts/_base/000-replace-kernel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,6 @@ set -euox pipefail
COREOS_KERNEL=""
FEDORA_VERSION=""

while [[ $# -gt 0 ]]; do
case "$1" in
--version)
FEDORA_VERSION="$2"
shift 2
;;
--coreos-kernel)
COREOS_KERNEL="$2"
shift 2
;;
*)
echo "Unknown argument: $1"
exit 1
;;
esac
done

if [[ "$COREOS_KERNEL" == "N/A" ]]; then
exit 0
fi
Expand Down
34 changes: 0 additions & 34 deletions scripts/_base/009-bootc.sh

This file was deleted.

25 changes: 7 additions & 18 deletions scripts/setup.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

set -euox pipefail
set -euo pipefail

BASE=""
FEDORA_VERSION=""
Expand All @@ -12,14 +12,6 @@ while [[ $# -gt 0 ]]; do
BASE="$2"
shift 2
;;
--version)
FEDORA_VERSION="$2"
shift 2
;;
--coreos-kernel)
COREOS_KERNEL="$2"
shift 2
;;
*)
echo "Unknown argument: $1"
exit 1
Expand All @@ -32,15 +24,11 @@ if [[ -z "$BASE" ]]; then
exit 1
fi

if [[ -z "$FEDORA_VERSION" ]]; then
echo "--version flag is required"
exit 1
fi

for script in /tmp/scripts/_base/*.sh; do
if [[ -f "$script" ]]; then
echo "Running $script"
bash "$script" --version "$FEDORA_VERSION" --coreos-kernel "$COREOS_KERNEL"
echo "::group::===$(basename "$script")==="
bash "$script"
echo "::endgroup::"
fi
done

Expand All @@ -51,7 +39,8 @@ fi

for script in /tmp/scripts/_$BASE/*.sh; do
if [[ -f "$script" ]]; then
echo "Running $script"
bash "$script" --version "$FEDORA_VERSION"
echo "::group::===$(basename "$script")==="
bash "$script"
echo "::endgroup::"
fi
done

0 comments on commit 3a239a7

Please sign in to comment.