Add .editorconfig and correct indentation for many seqs

This commit is contained in:
2022-03-14 21:27:29 +01:00
parent bb8b54597a
commit 71612aef94
34 changed files with 178 additions and 164 deletions

View File

@@ -52,7 +52,7 @@ HDSWAPPUUID=
evalArgs() {
local argCount=0
for arg in "$@"; do
case "$1" in
-a|--arch)
@@ -75,7 +75,7 @@ evalArgs() {
step_1_info() {
# Shift away args
shift; local lArgs=( "$@" ); evalArgs "${lArgs[@]}"; shift $?
echoinfoArgs "[OPTIONS] [SD CARD DEVICE] [HD DEVICE]"
echo "Download latest Raspberry Pi OS lite image $PIARCH"
if [ $CONTEXT_EXE -ne 0 ]; then
@@ -89,7 +89,7 @@ step_1_alias() { ALIAS="setup"; }
step_1() {
# Shift away args
shift; local lArgs=( "$@" ); evalArgs "${lArgs[@]}"; shift $?
if [ ! -f "$downLoc" ] ; then
exe wget "$PIDOWNURL" -O "$downLoc"
echo -ne " [I] sha256 sum of download:\n "
@@ -244,7 +244,7 @@ step_4() {
else
echo " Replace \"root=PARTUUID=******00-01\" manually"
fi
# Disable initial resizing of the second partition
echo -n " [I] remove \"init=/usr/lib/raspi-config/init_resize.sh\""
exe sed -i -E "s/[ ]*init=.*\/init_resize\.sh//" "$SDBOOT/cmdline.txt"
@@ -253,11 +253,11 @@ step_4() {
else
echo -e "\n Failed! Remove init=... manually"
fi
# Save modifications for HD boot
exe cp -ar "$SDBOOT"/cmdline.txt "$SDBOOT"/cmdline.txt.hd
echo
# Resize second partition of SD to max. possible size
echo " [I] Resize root partion of SD: ${SDROOT} "
step resizesd "$SDDEV"
@@ -357,7 +357,7 @@ read_sd_dev() {
SDDEV=
return 1
fi
if [[ "$SDDEV" =~ .*blk.* ]] ; then
partExt="p"
fi
@@ -451,7 +451,7 @@ step_22() {
return 1
fi
echo " [I] Device to be resized: $SDROOTDEV"
exe umount -q "$SDROOT"
exe parted -s "$SDDEV" "resizepart $SDROOTPARTNO -1" quit
saveReturn $?
@@ -530,7 +530,7 @@ step_31_alias() { ALIAS="disable_wifi"; }
step_31() {
checkBootConfig "$RPI_CONFIG_DTOVERLAY" "$RPI_CONF_DI_WIFI"
[ $? -eq 0 ] && endReturn -o 1 "Wifi already disabled"
addConf -a "${RPI_CONFIG_DTOVERLAY}=$RPI_CONF_DI_WIFI" "$RPI_BOOT_CONFIG"
echoseq " [W] Reboot to make changes active"
@@ -560,7 +560,7 @@ step_34() {
exe sed -i "s/^exit 0/# Turn off tvservice/" "$startScript"
exep "echo \"${tvserviceOffCmd}\" >> $startScript"
exep "echo -e \"\nexit 0\" >> $startScript"
echoseq " [W] Reboot to make changes active"
}
tvserviceBin="/usr/bin/tvservice"