Skip to content

Commit

Permalink
Fix incorrect use of [ || ]
Browse files Browse the repository at this point in the history
To use || for OR test, [[ ]] should be used instead of [].

This fixes below error:
  scripts/envsetup.sh: line 1784: [: missing `]'
  scripts/envsetup.sh: line 1784: mango: command not found
  • Loading branch information
Kai Liu authored and SophgoChaoWei committed Sep 25, 2024
1 parent 8ae3f6e commit c579a39
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/envsetup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1523,7 +1523,7 @@ function build_rv_fedora_image()
sudo mkdir -p $RV_OUTPUT_DIR/efi/EFI/BOOT
sudo mkdir -p $RV_OUTPUT_DIR/efi/EFI/fedora

if [ "$CHIP" = "sg2044" || "$CHIP" = "bm1690" ];then
if [[ "$CHIP" = "sg2044" || "$CHIP" = "bm1690" ]];then
sudo cp $RV_FIRMWARE/fsbl.bin $RV_OUTPUT_DIR/efi/riscv64
sudo cp $RV_FIRMWARE_INSTALL_DIR/zsbl.bin $RV_OUTPUT_DIR/efi/riscv64
else
Expand Down Expand Up @@ -1809,7 +1809,7 @@ function build_rv_firmware_image()
sudo mkdir -p efi/riscv64

echo copy bootloader...
if [ "$CHIP" = "sg2044" || "$CHIP" = "bm1690" ];then
if [[ "$CHIP" = "sg2044" || "$CHIP" = "bm1690" ]];then
sudo cp $RV_FIRMWARE/fsbl.bin efi/riscv64
sudo cp zsbl.bin efi/riscv64
else
Expand Down Expand Up @@ -1852,7 +1852,7 @@ function build_rv_firmware_package()
mkdir -p firmware/riscv64

echo copy bootloader...
if [ "$CHIP" = "sg2044" || "$CHIP" = "bm1690" ];then
if [[ "$CHIP" = "sg2044" || "$CHIP" = "bm1690" ]];then
cp $RV_FIRMWARE/fsbl.bin firmware/riscv64
cp zsbl.bin firmware/riscv64
else
Expand Down

0 comments on commit c579a39

Please sign in to comment.