From f52486a5777cdb250c92b78246922a7f0e6df1cf 2018-11-22 23:19:14 From: burnbabyburn <2515038+burnbabyburn@users.noreply.github.com> Date: 2018-11-22 23:19:14 Subject: [PATCH] Merge pull request #8 from drtyhlpr/master Fix: IMAGE_NAME --- diff --git a/rpi23-gen-image.sh b/rpi23-gen-image.sh index d84fa74..34e54e4 100755 --- a/rpi23-gen-image.sh +++ b/rpi23-gen-image.sh @@ -62,14 +62,6 @@ BLUETOOTH_URL=${BLUETOOTH_URL:=https://github.com/RPi-Distro/pi-bluetooth.git} BASEDIR=${BASEDIR:=$(pwd)/images/${RELEASE}} BUILDDIR="${BASEDIR}/build" -# Prepare date string for default image file name -DATE="$(date +%Y-%m-%d)" -if [ -z "$KERNEL_BRANCH" ] ; then - IMAGE_NAME=${IMAGE_NAME:=${BASEDIR}/${DATE}-${KERNEL_ARCH}-CURRENT-rpi${RPI_MODEL}-${RELEASE}-${RELEASE_ARCH}} -else - IMAGE_NAME=${IMAGE_NAME:=${BASEDIR}/${DATE}-${KERNEL_ARCH}-${KERNEL_BRANCH}-rpi${RPI_MODEL}-${RELEASE}-${RELEASE_ARCH}} -fi - # Chroot directories R="${BUILDDIR}/chroot" ETC_DIR="${R}/etc" @@ -210,7 +202,6 @@ set +x # Setup architecture specific settings if [ -n "$SET_ARCH" ] ; then - # 64 bit configuration if [ "$SET_ARCH" = 64 ] ; then # General 64 bit depended settings @@ -292,7 +283,14 @@ fi exit 1 ;; esac - echo "$DTB_FILE selected" + +# Prepare date string for default image file name +DATE="$(date +%Y-%m-%d)" +if [ -z "$KERNEL_BRANCH" ] ; then + IMAGE_NAME=${IMAGE_NAME:=${BASEDIR}/${DATE}-${KERNEL_ARCH}-CURRENT-rpi${RPI_MODEL}-${RELEASE}-${RELEASE_ARCH}} +else + IMAGE_NAME=${IMAGE_NAME:=${BASEDIR}/${DATE}-${KERNEL_ARCH}-${KERNEL_BRANCH}-rpi${RPI_MODEL}-${RELEASE}-${RELEASE_ARCH}} +fi # Check if the internal wireless interface is supported by the RPi model if [ "$ENABLE_WIRELESS" = true ] ; then