Improve update_issue() function in common script
* Allow to customise pi-gen script name and repository in the generated issue file * Preserve compatibility with existing function calls
This commit is contained in:
parent
3b90b7ffed
commit
9e6af47045
3
build.sh
3
build.sh
|
@ -137,6 +137,9 @@ do
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
export PI_GEN=${PI_GEN:-pi-gen}
|
||||||
|
export PI_GEN_REPO=${PI_GEN_REPO:-https://github.com/RPi-Distro/pi-gen}
|
||||||
|
|
||||||
if [ -z "${IMG_NAME}" ]; then
|
if [ -z "${IMG_NAME}" ]; then
|
||||||
echo "IMG_NAME not set" 1>&2
|
echo "IMG_NAME not set" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
@ -96,7 +96,7 @@ export -f on_chroot
|
||||||
update_issue() {
|
update_issue() {
|
||||||
local GIT_HASH
|
local GIT_HASH
|
||||||
GIT_HASH=$(git rev-parse HEAD)
|
GIT_HASH=$(git rev-parse HEAD)
|
||||||
echo -e "Raspberry Pi reference ${IMG_DATE}\nGenerated using pi-gen, https://github.com/RPi-Distro/pi-gen, ${GIT_HASH}, ${1}" > "${ROOTFS_DIR}/etc/rpi-issue"
|
echo -e "Raspberry Pi reference ${IMG_DATE}\nGenerated using ${PI_GEN}, ${PI_GEN_REPO}, ${GIT_HASH}, ${1}" > "${ROOTFS_DIR}/etc/rpi-issue"
|
||||||
}
|
}
|
||||||
export -f update_issue
|
export -f update_issue
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user