Skip to content
Merged
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
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [22.7.0]

### Added

- all
- CachyOS support

## [22.6.4]

### Added
Expand Down
18 changes: 10 additions & 8 deletions bashlib64.bash
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ builtin unset MAILPATH

# shellcheck disable=SC2034
{
declare BL64_VERSION='22.6.4'
declare BL64_VERSION='22.7.0'

#
# Imported generic shell standard variables
Expand Down Expand Up @@ -823,7 +823,7 @@ function bl64_lib_script_minver_check() {

# shellcheck disable=SC2034
{
declare BL64_OS_VERSION='5.9.1'
declare BL64_OS_VERSION='5.10.0'

declare BL64_OS_MODULE='0'

Expand Down Expand Up @@ -4757,6 +4757,10 @@ function _bl64_os_get_distro_from_os_release() {

bl64_dbg_lib_show_info 'set BL_OS_DISTRO'
case "${ID^^}" in
'ARCH' | 'CACHYOS')
BL64_OS_DISTRO="${BL64_OS_ARC}-${version_normalized}"
BL64_OS_FLAVOR="$BL64_OS_FLAVOR_ARCH"
;;
'ALMALINUX')
BL64_OS_DISTRO="${BL64_OS_ALM}-${version_normalized}"
BL64_OS_FLAVOR="$BL64_OS_FLAVOR_REDHAT"
Expand All @@ -4769,10 +4773,6 @@ function _bl64_os_get_distro_from_os_release() {
BL64_OS_DISTRO="${BL64_OS_AMZ}-${version_normalized}"
BL64_OS_FLAVOR="$BL64_OS_FLAVOR_FEDORA"
;;
'ARCH')
BL64_OS_DISTRO="${BL64_OS_ARC}-${version_normalized}"
BL64_OS_FLAVOR="$BL64_OS_FLAVOR_ARCH"
;;
'CENTOS')
BL64_OS_DISTRO="${BL64_OS_CNT}-${version_normalized}"
BL64_OS_FLAVOR="$BL64_OS_FLAVOR_REDHAT"
Expand Down Expand Up @@ -4836,12 +4836,14 @@ function _bl64_os_release_load() {

function _bl64_os_release_normalize() {
bl64_dbg_lib_show_function "$@"
local version_raw="$1"
local version_raw="${1:-}"
local version_normalized=''
local version_pattern_single='^[0-9]+$'
local version_pattern_major_minor='^[0-9]+\.[0-9]+$'
local version_pattern_semver='^[0-9]+\.[0-9]+\.[0-9]+$'

bl64_check_parameter 'version_raw' || return $?

bl64_dbg_lib_show_comments 'normalize OS version to match X.Y'
if [[ "$version_raw" =~ $version_pattern_single ]]; then
bl64_dbg_lib_show_info "version_pattern_single: ${version_pattern_single}"
Expand All @@ -4851,7 +4853,7 @@ function _bl64_os_release_normalize() {
version_normalized="${version_raw}"
elif [[ "$version_raw" =~ $version_pattern_semver ]]; then
bl64_dbg_lib_show_info "version_pattern_semver: ${version_pattern_semver}"
if [[ "${ID^^}" == 'ARCH' ]]; then
if [[ "${ID^^}" =~ ^(ARCH|CACHYOS)$ ]]; then
bl64_dbg_lib_show_comments 'convert rolling version YYYYMMDD to YYYY.MM'
version_normalized="${version_raw:0:4}.${version_raw:4:2}"
else
Expand Down
2 changes: 1 addition & 1 deletion src/bl64-lib-env.bash
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# shellcheck disable=SC2034
{
declare BL64_VERSION='22.6.4'
declare BL64_VERSION='22.7.0'

#
# Imported generic shell standard variables
Expand Down
2 changes: 1 addition & 1 deletion src/bl64-os-env.bash
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# shellcheck disable=SC2034
{
declare BL64_OS_VERSION='5.9.1'
declare BL64_OS_VERSION='5.10.0'

declare BL64_OS_MODULE='0'

Expand Down
14 changes: 8 additions & 6 deletions src/bl64-os-setup.bash
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,10 @@ function _bl64_os_get_distro_from_os_release() {

bl64_dbg_lib_show_info 'set BL_OS_DISTRO'
case "${ID^^}" in
'ARCH' | 'CACHYOS')
BL64_OS_DISTRO="${BL64_OS_ARC}-${version_normalized}"
BL64_OS_FLAVOR="$BL64_OS_FLAVOR_ARCH"
;;
'ALMALINUX')
BL64_OS_DISTRO="${BL64_OS_ALM}-${version_normalized}"
BL64_OS_FLAVOR="$BL64_OS_FLAVOR_REDHAT"
Expand All @@ -320,10 +324,6 @@ function _bl64_os_get_distro_from_os_release() {
BL64_OS_DISTRO="${BL64_OS_AMZ}-${version_normalized}"
BL64_OS_FLAVOR="$BL64_OS_FLAVOR_FEDORA"
;;
'ARCH')
BL64_OS_DISTRO="${BL64_OS_ARC}-${version_normalized}"
BL64_OS_FLAVOR="$BL64_OS_FLAVOR_ARCH"
;;
'CENTOS')
BL64_OS_DISTRO="${BL64_OS_CNT}-${version_normalized}"
BL64_OS_FLAVOR="$BL64_OS_FLAVOR_REDHAT"
Expand Down Expand Up @@ -387,12 +387,14 @@ function _bl64_os_release_load() {

function _bl64_os_release_normalize() {
bl64_dbg_lib_show_function "$@"
local version_raw="$1"
local version_raw="${1:-}"
local version_normalized=''
local version_pattern_single='^[0-9]+$'
local version_pattern_major_minor='^[0-9]+\.[0-9]+$'
local version_pattern_semver='^[0-9]+\.[0-9]+\.[0-9]+$'

bl64_check_parameter 'version_raw' || return $?

bl64_dbg_lib_show_comments 'normalize OS version to match X.Y'
if [[ "$version_raw" =~ $version_pattern_single ]]; then
bl64_dbg_lib_show_info "version_pattern_single: ${version_pattern_single}"
Expand All @@ -402,7 +404,7 @@ function _bl64_os_release_normalize() {
version_normalized="${version_raw}"
elif [[ "$version_raw" =~ $version_pattern_semver ]]; then
bl64_dbg_lib_show_info "version_pattern_semver: ${version_pattern_semver}"
if [[ "${ID^^}" == 'ARCH' ]]; then
if [[ "${ID^^}" =~ ^(ARCH|CACHYOS)$ ]]; then
bl64_dbg_lib_show_comments 'convert rolling version YYYYMMDD to YYYY.MM'
version_normalized="${version_raw:0:4}.${version_raw:4:2}"
else
Expand Down
Loading