mirror of
https://github.com/kevinveenbirkenbach/linux-image-manager.git
synced 2024-11-21 22:51:05 +01:00
Optimized shellcheck hints
This commit is contained in:
parent
f51eaa12e6
commit
b1cee3a6e1
@ -3,6 +3,10 @@
|
||||
# This script contains the global program variables and functions
|
||||
#
|
||||
# shellcheck disable=SC2034 #Deactivate checking of unused variables
|
||||
# shellcheck disable=SC2003 #Deactivate "expr is antiquated"
|
||||
# shellcheck disable=SC2015 #Deactivate bool hint
|
||||
# shellcheck disable=SC2005 #Remove useless echo hint
|
||||
# shellcheck disable=SC2010 #Deactivate ls | grep hint
|
||||
|
||||
REPOSITORY_PATH=$(readlink -f "$(dirname "$(readlink -f "${0}")")/../../") # Propably this can be optimized
|
||||
CONFIGURATION_PATH="$REPOSITORY_PATH""/configuration/"
|
||||
@ -76,7 +80,7 @@ set_device_path(){
|
||||
error "$device_path is not valid device."
|
||||
fi
|
||||
# @see https://www.heise.de/ct/hotline/Optimale-Blockgroesse-fuer-dd-2056768.html
|
||||
OPTIMAL_BLOCKSIZE=$(expr 64 \* "$(sudo cat /sys/block/$device/queue/physical_block_size)") &&
|
||||
OPTIMAL_BLOCKSIZE=$(expr 64 \* "$(sudo cat /sys/block/"$device"/queue/physical_block_size)") &&
|
||||
info "Device path set to: $device_path" &&
|
||||
info "Optimal blocksize set to: $OPTIMAL_BLOCKSIZE" ||
|
||||
error
|
||||
|
@ -6,6 +6,7 @@
|
||||
# shellcheck disable=SC2010 # ls | grep allowed
|
||||
# shellcheck source=/dev/null # Deactivate SC1090
|
||||
# shellcheck disable=SC2015 # Deactivate bools hints
|
||||
# shellcheck disable=SC2154 # Deactivate referenced but not assigned hints
|
||||
source "$(dirname "$(readlink -f "${0}")")/../base.sh" || (echo "Loading base.sh failed." && exit 1)
|
||||
|
||||
# Writes the full partition name
|
||||
|
Loading…
Reference in New Issue
Block a user