Skip to content

Commit 14e0462

Browse files
committed
Add handeling new renaming of raspbian to raspios
1 parent 369d8cb commit 14e0462

2 files changed

Lines changed: 10 additions & 7 deletions

File tree

src/modules/base/config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ if [ "${BASE_DISTRO}" == "ubuntu" ]; then
2121
[ -n "$BASE_USER" ] || BASE_USER=ubuntu
2222
else
2323
# Default image raspbian
24-
[ -n "$BASE_ZIP_IMG" ] || BASE_ZIP_IMG=`ls -t $BASE_IMAGE_PATH/*-raspbian*.zip | head -n 1`
24+
[ -n "$BASE_ZIP_IMG" ] || BASE_ZIP_IMG=`ls -t $BASE_IMAGE_PATH/*-{raspbian,raspios}*.zip | head -n 1`
2525
# Default user raspbian
2626
[ -n "$BASE_USER" ] || BASE_USER=pi
2727
fi

src/release

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,20 @@ FILENAME=$(basename `ls . | grep -e .img$ -e .raw$ | tail -n 1`)
1717

1818
if [ "${BASE_RELEASE_IMG_NAME}" == "default" ]; then
1919
if [ "${BASE_DISTRO}" == "ubuntu" ]; then
20-
CHANGE_STRING="ubuntu"
20+
CHANGE_STRING_LIST=( "ubuntu" )
2121
else
22-
CHANGE_STRING="raspbian"
22+
CHANGE_STRING_LIST=( "raspbian" "raspios")
2323
fi
2424

2525
# Handle variant name
26-
if [ -z "$1" ];then
26+
for CHANGE_STRING in "${CHANGE_STRING_LIST[@]}"
27+
do
28+
if [ -z "$1" ];then
2729
IMG_FILENAME=$(echo "${FILENAME::-4}"-"${DIST_VERSION}" | sed "s/${CHANGE_STRING}/${DIST_NAME,,}/").img
28-
else
29-
IMG_FILENAME=$(echo "${FILENAME::-4}"-"${DIST_VERSION}" | sed "s/${CHANGE_STRING}/${DIST_NAME,,}-$1/").img
30-
fi
30+
else
31+
IMG_FILENAME=$(echo "${FILENAME::-4}"-"${DIST_VERSION}" | sed "s/${CHANGE_STRING}/${DIST_NAME,,}-$1/").img
32+
fi
33+
done
3134
else
3235
IMG_FILENAME="${BASE_IMG_NAME}"
3336
fi

0 commit comments

Comments
 (0)