Browse Source

Merge pull request #141 from oleorhagen/shellcheck

Shellcheck
2.0.x
oleorhagen 5 years ago
committed by GitHub
parent
commit
222d52d834
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      mender-convert
  2. 2
      mender-convert-extract
  3. 2
      mender-convert-modify
  4. 6
      mender-convert-package
  5. 2
      modules/disk.sh
  6. 4
      modules/probe.sh
  7. 2
      scripts/run-tests.sh

4
mender-convert

@ -67,7 +67,7 @@ while (( "$#" )); do
exit 0
;;
*)
break;
break
;;
esac
done
@ -82,7 +82,7 @@ if [ -z "${MENDER_ARTIFACT_NAME}" ]; then
echo "Sorry, it seems that you have not defined MENDER_ARTIFACT_NAME"
echo "You can do this with the following command:"
echo ""
echo -e "\tMENDER_ARTIFACT_NAME="release-1" ./mender-convert"
echo -e "\tMENDER_ARTIFACT_NAME=\"release-1\" ./mender-convert"
exit 1
fi

2
mender-convert-extract

@ -1,4 +1,4 @@
#!/bin/bash
#! /usr/bin/env bash
#
# Copyright 2019 Northern.tech AS
#

2
mender-convert-modify

@ -1,4 +1,4 @@
#!/bin/bash
#! /usr/bin/env bash
#
# Copyright 2019 Northern.tech AS
#

6
mender-convert-package

@ -1,4 +1,4 @@
#!/bin/bash
#! /usr/bin/env bash
#
# Copyright 2019 Northern.tech AS
#
@ -129,8 +129,8 @@ fi
boot_part_sectors=$(disk_align_sectors ${boot_part_sectors} ${MENDER_PARTITION_ALIGNMENT} )
# Calculate rootfs size
rootfs_part_sectors=$(( (${disk_image_total_sectors} - ${data_part_sectors} \
- ${boot_part_sectors} - ${overhead_sectors}) / 2 ))
rootfs_part_sectors=$(((${disk_image_total_sectors} - ${data_part_sectors} - \
${boot_part_sectors} - ${overhead_sectors}) / 2))
# Make sure rootfs size is aligned to MENDER_PARTITION_ALIGNMENT
rootfs_part_sectors=$(disk_align_sectors ${rootfs_part_sectors} ${MENDER_PARTITION_ALIGNMENT} )

2
modules/disk.sh

@ -75,7 +75,6 @@ disk_sectors_to_mb() {
echo "$(( (${1} * 512) / 1024 / 1024 ))"
}
# Align value (result is number of 512 sectors)
#
# $1 - value to align (number of 512 sectors)
@ -129,6 +128,7 @@ disk_create_file_system_from_folder() {
;;
*)
log_fatal "Unknown file system type specified: ${4}"
;;
esac
run_and_log_cmd "mkdir -p work/output"

4
modules/probe.sh

@ -65,6 +65,7 @@ probe_grub_efi_name() {
;;
*)
log_fatal "Unknown arch: ${arch}"
;;
esac
echo "$efi_name"
}
@ -88,6 +89,7 @@ probe_debian_arch_name() {
;;
*)
log_fatal "Unknown arch: ${arch}"
;;
esac
echo "${deb_arch}"
}
@ -113,6 +115,7 @@ probe_grub_efi_target_name() {
;;
*)
log_fatal "Unknown arch: ${arch}"
;;
esac
echo "$efi_target_name"
}
@ -163,7 +166,6 @@ probe_initrd_image() {
echo "${initrd_image_path}"
}
# Prints Linux kernel image name
#
# It will look for it in both boot and rootfs parts. If image is only present

2
scripts/run-tests.sh

@ -59,11 +59,11 @@ convert_and_test() {
*)
echo "Unknown image type: ${image_name_compressed}"
exit 1
;;
esac
rm -f ${WORKSPACE}/test_config
# Two motives for the following statement
#
# - speed up tests by avoiding decompression on all images (majority of images

Loading…
Cancel
Save