Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ INITCPIODIR=$(PREFIX)/lib/initcpio
MANDIR=$(PREFIX)/share/man
BINDIR=$(PREFIX)/bin
EXAMPLES=$(PREFIX)/share/examples/zfsbootmenu
SED?=sed

export SED

.PHONY: install core dracut initcpio zbm-release show-version

Expand Down
8 changes: 5 additions & 3 deletions releng/tag-release.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash
# vim: softtabstop=2 shiftwidth=2 expandtab

: ${SED:=sed}

error () {
echo "$@"
exit 1
Expand All @@ -14,7 +16,7 @@ fi

# Validate release
# shellcheck disable=SC2001
if [ -n "$(echo "${release}" | sed 's/[0-9][A-Za-z0-9_.-]*$//')" ]; then
if [ -n "$(echo "${release}" | $SED 's/[0-9][A-Za-z0-9_.-]*$//')" ]; then
error "ERROR: release must start with a number and contain [A-Za-z0-9_.-]"
fi

Expand Down Expand Up @@ -75,7 +77,7 @@ fi
echo "Will tag release version ${release} as ${tag}"

# update version in documentation
sed -i "s/^release = '.*'\$/release = '${release}'/" docs/conf.py
$SED -i "s/^release = '.*'\$/release = '${release}'/" docs/conf.py

# Synchronize man pages with POD documentation
if [ ! -x releng/rst2help.sh ]; then
Expand Down Expand Up @@ -180,7 +182,7 @@ for f in sha256.{txt,sig}; do
done

# github-cli does not automatically strip header that hub uses for a title
sed -i '1,/^$/d' "${relnotes}"
$SED -i '1,/^$/d' "${relnotes}"

echo "Release ${release} ready to push and tag"
while true; do
Expand Down
6 changes: 4 additions & 2 deletions releng/version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ detect_version() (
if [ -r "${genzbm}" ]; then
# shellcheck disable=SC2016
if verline="$(grep 'our $VERSION[[:space:]]*=' "${genzbm}")"; then
version="$(echo "${verline}" | head -n1 | sed -e "s/.*=[[:space:]]*['\"]//" -e "s/['\"].*//")" || version=""
version="$(echo "${verline}" | head -n1 | ${SED} -e "s/.*=[[:space:]]*['\"]//" -e "s/['\"].*//")" || version=""
if [ -n "${version}" ]; then
echo "${version}"
return 0
Expand Down Expand Up @@ -103,10 +103,12 @@ update_version() {
# Update generate-zbm
if [ -w bin/generate-zbm ]; then
echo "Updating bin/generate-zbm"
sed -e "s/our \$VERSION.*/our \$VERSION = '${version}';/" -i bin/generate-zbm
${SED} -e "s/our \$VERSION.*/our \$VERSION = '${version}';/" -i bin/generate-zbm
fi
}

: ${SED:=sed}

version=
update=
while getopts "huv:" opt; do
Expand Down
10 changes: 6 additions & 4 deletions testing/helpers/zbm-populate.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

: ${SED:=sed}

# Clone ZFSBootMenu and install
( cd / && git clone https://github.com/zbm-dev/zfsbootmenu.git )
( cd /zfsbootmenu && make install )
Expand All @@ -11,24 +13,24 @@ fi

# Adjust the configuration for convenient builds
if [ -f /etc/zfsbootmenu/config.yaml ]; then
sed -e 's/Versions:.*/Versions: false/' \
$SED -e 's/Versions:.*/Versions: false/' \
-e 's/ManageImages:.*/ManageImages: true/' \
-e 's@ImageDir:.*@ImageDir: /zfsbootmenu/build@' \
-e '/BootMountPoint:/d' -i /etc/zfsbootmenu/config.yaml

# Build the EFI executable if the stub is available
for stubdir in /usr/lib/systemd/boot/efi /usr/lib/gummiboot; do
[ -r "${stubdir}/linuxx64.efi.stub" ] || continue
sed -e 's/Enabled:.*/Enabled: true/' -i /etc/zfsbootmenu/config.yaml
$SED -e 's/Enabled:.*/Enabled: true/' -i /etc/zfsbootmenu/config.yaml
break
done

case "${INITCPIO,,}" in
yes|y|on|1)
sed -e "s/InitCPIO:.*/InitCPIO: true/" -i /etc/zfsbootmenu/config.yaml
$SED -e "s/InitCPIO:.*/InitCPIO: true/" -i /etc/zfsbootmenu/config.yaml
;;
no|n|off|0)
sed -e "s/InitCPIO:.*/InitCPIO: false/" -i /etc/zfsbootmenu/config.yaml
$SED -e "s/InitCPIO:.*/InitCPIO: false/" -i /etc/zfsbootmenu/config.yaml
;;
esac
fi
Expand Down