Possible syntax error in kernel_module_config.functions.sh #100

Open
opened 2024-05-03 10:07:56 +02:00 by deric · 0 comments
deric commented 2024-05-03 10:07:56 +02:00 (Migrated from github.com)
/root/.oldroot/nfs/install/kernel_module_config.functions.sh: line 36: syntax error near unexpected token `}'
/root/.oldroot/nfs/install/kernel_module_config.functions.sh: line 36: `    { [[ "$IAM" == debian ]] && ((IMG_VERSION < 1300)) } ||'

here's the relevant part of code:

  [[ "$IAM" == ubuntu ]] &&
    ((IMG_VERSION == 2004)) &&
    hwe_image &&
    [[ "$(board_vendor)" == 'ASUSTeK COMPUTER INC.' ]] &&
    [[ "$(board_name)" == 'PRIME B760M-A D4' ]] &&
    return 0
  {
    { [[ "$IAM" == debian ]] && ((IMG_VERSION < 1300)) } ||
    { [[ "$IAM" == ubuntu ]] && ((IMG_VERSION < 2204)) }
  } &&
    [[ "$(board_vendor)" == 'Gigabyte Technology Co., Ltd.' ]] &&
    has_b360hd3p_board &&
    return 0

which was introduced in 6998e11af9.

I guess the curly brackets should be removed, e.g.:

     [[ "$IAM" == debian  && ((IMG_VERSION < 1300)) ]] ||
     [[ "$IAM" == ubuntu && ((IMG_VERSION < 2204)) ]] 
``` /root/.oldroot/nfs/install/kernel_module_config.functions.sh: line 36: syntax error near unexpected token `}' /root/.oldroot/nfs/install/kernel_module_config.functions.sh: line 36: ` { [[ "$IAM" == debian ]] && ((IMG_VERSION < 1300)) } ||' ``` here's the relevant [part of code](https://github.com/hetzneronline/installimage/blob/master/kernel_module_config.functions.sh#L36): ``` [[ "$IAM" == ubuntu ]] && ((IMG_VERSION == 2004)) && hwe_image && [[ "$(board_vendor)" == 'ASUSTeK COMPUTER INC.' ]] && [[ "$(board_name)" == 'PRIME B760M-A D4' ]] && return 0 { { [[ "$IAM" == debian ]] && ((IMG_VERSION < 1300)) } || { [[ "$IAM" == ubuntu ]] && ((IMG_VERSION < 2204)) } } && [[ "$(board_vendor)" == 'Gigabyte Technology Co., Ltd.' ]] && has_b360hd3p_board && return 0 ``` which was introduced in 6998e11af973238b4860f3edd21b9e87b6cb2983. I guess the curly brackets should be removed, e.g.: ``` [[ "$IAM" == debian && ((IMG_VERSION < 1300)) ]] || [[ "$IAM" == ubuntu && ((IMG_VERSION < 2204)) ]] ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
DiamantTh/installimage#100
No description provided.