Describe how to install with testenvironment
This commit is contained in:
@@ -14,7 +14,8 @@ SHRINK_MIB=4096
|
||||
OEMDRV_LABEL="OEMDRV"
|
||||
MOUNT_POINT="/opt/sys_config"
|
||||
MOUNT_OPTS="compress=zstd:6"
|
||||
REPO_URL="${1:-https://gitea.dtext.online/obel1x/fedora-OEMDRV.git}"
|
||||
REPO_URL="${REPO_URL:-https://gitea.dtext.online/obel1x/fedora-OEMDRV.git}"
|
||||
REPO_BRANCH="${REPO_BRANCH:-main}"
|
||||
MIN_FREE_MIB=$(( SHRINK_MIB + 512 )) # require 512 MiB headroom above the shrink size
|
||||
|
||||
# ── Helpers ───────────────────────────────────────────────────────────────────
|
||||
@@ -69,7 +70,7 @@ check_repo_url() {
|
||||
|
||||
tmpdir=$(mktemp -d /tmp/oemdrv_repocheck.XXXXXX)
|
||||
|
||||
if ! curl -fsSL "${REPO_URL%.git}/raw/branch/main/system_setup/install.sh" \
|
||||
if ! curl -fsSL "${REPO_URL%.git}/raw/branch/${REPO_BRANCH}/system_setup/install.sh" \
|
||||
-o "$tmpdir/install.sh" 2>/dev/null; then
|
||||
rm -rf "$tmpdir"
|
||||
return 1
|
||||
@@ -293,13 +294,13 @@ info "Verifying repository URL..."
|
||||
check_repo_url
|
||||
case $? in
|
||||
1) echo
|
||||
echo "WARNING: '$REPO_URL' is not a reachable git repository."
|
||||
echo "WARNING: '$REPO_URL' branch '${REPO_BRANCH}' is not a reachable git repository."
|
||||
read -r -p " Continue anyway? [y/N]: " ans
|
||||
[[ "${ans,,}" == "y" ]] || { echo "Aborted."; exit 0; }
|
||||
;;
|
||||
2) echo
|
||||
echo "WARNING: The checksum of this script does not match 'system_setup/install.sh'"
|
||||
echo " at '$REPO_URL'."
|
||||
echo " at '$REPO_URL' branch '${REPO_BRANCH}'."
|
||||
echo " You may be running an outdated or modified version of install.sh."
|
||||
read -r -p " Continue anyway? [y/N]: " ans
|
||||
[[ "${ans,,}" == "y" ]] || { echo "Aborted."; exit 0; }
|
||||
@@ -496,7 +497,7 @@ mount -o "$MOUNT_OPTS" "$OEMDRV_DEV" "$MOUNT_POINT" || die "mount failed."
|
||||
|
||||
info "Cloning $REPO_URL into $MOUNT_POINT..."
|
||||
cd "$MOUNT_POINT" || die "Cannot cd to $MOUNT_POINT."
|
||||
git clone --progress --depth 1 "$REPO_URL" . || die "git clone failed."
|
||||
git clone --progress --depth 1 -b $REPO_BRANCH "$REPO_URL" . || die "git clone failed."
|
||||
|
||||
# Write hardware UUID to a user-readable per-machine file
|
||||
dmidecode -t system | grep -i 'UUID' \
|
||||
|
||||
Reference in New Issue
Block a user