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

4
mender-convert-package

@ -129,8 +129,8 @@ fi
boot_part_sectors=$(disk_align_sectors ${boot_part_sectors} ${MENDER_PARTITION_ALIGNMENT} ) boot_part_sectors=$(disk_align_sectors ${boot_part_sectors} ${MENDER_PARTITION_ALIGNMENT} )
# Calculate rootfs size # Calculate rootfs size
rootfs_part_sectors=$(( (${disk_image_total_sectors} - ${data_part_sectors} \ rootfs_part_sectors=$(((${disk_image_total_sectors} - ${data_part_sectors} - \
- ${boot_part_sectors} - ${overhead_sectors}) / 2 )) ${boot_part_sectors} - ${overhead_sectors}) / 2))
# Make sure rootfs size is aligned to MENDER_PARTITION_ALIGNMENT # Make sure rootfs size is aligned to MENDER_PARTITION_ALIGNMENT
rootfs_part_sectors=$(disk_align_sectors ${rootfs_part_sectors} ${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 ))" echo "$(( (${1} * 512) / 1024 / 1024 ))"
} }
# Align value (result is number of 512 sectors) # Align value (result is number of 512 sectors)
# #
# $1 - value to align (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}" log_fatal "Unknown file system type specified: ${4}"
;;
esac esac
run_and_log_cmd "mkdir -p work/output" 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}" log_fatal "Unknown arch: ${arch}"
;;
esac esac
echo "$efi_name" echo "$efi_name"
} }
@ -88,6 +89,7 @@ probe_debian_arch_name() {
;; ;;
*) *)
log_fatal "Unknown arch: ${arch}" log_fatal "Unknown arch: ${arch}"
;;
esac esac
echo "${deb_arch}" echo "${deb_arch}"
} }
@ -113,6 +115,7 @@ probe_grub_efi_target_name() {
;; ;;
*) *)
log_fatal "Unknown arch: ${arch}" log_fatal "Unknown arch: ${arch}"
;;
esac esac
echo "$efi_target_name" echo "$efi_target_name"
} }
@ -163,7 +166,6 @@ probe_initrd_image() {
echo "${initrd_image_path}" echo "${initrd_image_path}"
} }
# Prints Linux kernel image name # Prints Linux kernel image name
# #
# It will look for it in both boot and rootfs parts. If image is only present # 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}", "ServerURL": "${server_url}",
EOF EOF
if [ -n "${server_cert}" ] ; then if [ -n "${server_cert}" ]; then
cat <<- EOF >> ${output_dir}/etc/mender/mender.conf cat <<- EOF >> ${output_dir}/etc/mender/mender.conf
"ServerCertificate": "/etc/mender/server.crt", "ServerCertificate": "/etc/mender/server.crt",
EOF EOF
cp -f "${server_cert}" ${output_dir}/etc/mender/server.crt cp -f "${server_cert}" ${output_dir}/etc/mender/server.crt
fi fi
cat <<- EOF >> ${output_dir}/etc/mender/mender.conf 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}" echo "Unknown image type: ${image_name_compressed}"
exit 1 exit 1
;;
esac esac
rm -f ${WORKSPACE}/test_config rm -f ${WORKSPACE}/test_config
# Two motives for the following statement # Two motives for the following statement
# #
# - speed up tests by avoiding decompression on all images (majority of images # - speed up tests by avoiding decompression on all images (majority of images

Loading…
Cancel
Save