Browse Source

Tidying: Move all indents to use two spaces

Previously there was a mix between two, and four spaces.

This commits unifies all scripts to use two-spaces for indentation.

Changelog: None

Signed-off-by: Ole Petter <ole.orhagen@northern.tech>
2.0.x
Ole Petter 5 years ago
parent
commit
69553bac0a
No known key found for this signature in database GPG Key ID: A7100375167A7B21
  1. 4
      mender-convert
  2. 4
      mender-convert-package
  3. 2
      modules/disk.sh
  4. 4
      modules/probe.sh
  5. 6
      scripts/bootstrap-rootfs-overlay-production-server.sh
  6. 2
      scripts/run-tests.sh

4
mender-convert

@ -56,7 +56,7 @@ trap trap_exit EXIT
# We only handle a selection of the arguments here, the rest are passed on
# to the sub-scripts.
while (( "$#" )); do
while (("$#")); do
case "$1" in
-h | --help)
show_help
@ -67,7 +67,7 @@ while (( "$#" )); do
exit 0
;;
*)
break;
break
;;
esac
done

4
mender-convert-package

@ -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

6
scripts/bootstrap-rootfs-overlay-production-server.sh

@ -65,11 +65,11 @@ cat <<- EOF > ${output_dir}/etc/mender/mender.conf
"ServerURL": "${server_url}",
EOF
if [ -n "${server_cert}" ] ; then
cat <<- EOF >> ${output_dir}/etc/mender/mender.conf
if [ -n "${server_cert}" ]; then
cat <<- EOF >> ${output_dir}/etc/mender/mender.conf
"ServerCertificate": "/etc/mender/server.crt",
EOF
cp -f "${server_cert}" ${output_dir}/etc/mender/server.crt
cp -f "${server_cert}" ${output_dir}/etc/mender/server.crt
fi
cat <<- EOF >> ${output_dir}/etc/mender/mender.conf

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