style: Quote variables (#563)

This commit is contained in:
Kroese 2024-01-14 01:11:58 +01:00 committed by GitHub
parent 6d3812d1d0
commit 893a013ae9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 45 additions and 45 deletions

View File

@ -11,4 +11,4 @@ jobs:
- name: Run ShellCheck - name: Run ShellCheck
uses: ludeeus/action-shellcheck@master uses: ludeeus/action-shellcheck@master
env: env:
SHELLCHECK_OPTS: -x --source-path=src -e SC2001 -e SC2223 -e SC2034 -e SC2064 -e SC2317 -e SC2153 -e SC2028 SHELLCHECK_OPTS: -x --source-path=src -e SC2001 -e SC2034 -e SC2064 -e SC2317 -e SC2153 -e SC2028

View File

@ -3,12 +3,12 @@ set -Eeuo pipefail
# Docker environment variables # Docker environment variables
: ${DISK_IO:='native'} # I/O Mode, can be set to 'native', 'threads' or 'io_turing' : "${DISK_IO:='native'}" # I/O Mode, can be set to 'native', 'threads' or 'io_turing'
: ${DISK_FMT:='raw'} # Disk file format, 'raw' by default for best performance : "${DISK_FMT:='raw'}" # Disk file format, 'raw' by default for best performance
: ${DISK_FLAGS:=''} # Specifies the options for use with the qcow2 disk format : "${DISK_FLAGS:=''}" # Specifies the options for use with the qcow2 disk format
: ${DISK_CACHE:='none'} # Caching mode, can be set to 'writeback' for better performance : "${DISK_CACHE:='none'}" # Caching mode, can be set to 'writeback' for better performance
: ${DISK_DISCARD:='on'} # Controls whether unmap (TRIM) commands are passed to the host. : "${DISK_DISCARD:='on'}" # Controls whether unmap (TRIM) commands are passed to the host.
: ${DISK_ROTATION:='1'} # Rotation rate, set to 1 for SSD storage and increase for HDD : "${DISK_ROTATION:='1'}" # Rotation rate, set to 1 for SSD storage and increase for HDD
BOOT="$STORAGE/$BASE.boot.img" BOOT="$STORAGE/$BASE.boot.img"
SYSTEM="$STORAGE/$BASE.system.img" SYSTEM="$STORAGE/$BASE.system.img"
@ -472,14 +472,14 @@ fi
DISK4_FILE="/storage4/data4" DISK4_FILE="/storage4/data4"
: ${DISK2_SIZE:=''} : "${DISK2_SIZE:=''}"
: ${DISK3_SIZE:=''} : "${DISK3_SIZE:=''}"
: ${DISK4_SIZE:=''} : "${DISK4_SIZE:=''}"
: ${DEVICE:=''} # Docker variables to passthrough a block device, like /dev/vdc1. : "${DEVICE:=''}" # Docker variables to passthrough a block device, like /dev/vdc1.
: ${DEVICE2:=''} : "${DEVICE2:=''}"
: ${DEVICE3:=''} : "${DEVICE3:=''}"
: ${DEVICE4:=''} : "${DEVICE4:=''}"
if [ -n "$DEVICE" ]; then if [ -n "$DEVICE" ]; then
addDevice "userdata" "$DEVICE" "device" "3" "0xc" || exit $? addDevice "userdata" "$DEVICE" "device" "3" "0xc" || exit $?

View File

@ -3,8 +3,8 @@ set -Eeuo pipefail
# Docker environment variables # Docker environment variables
: ${GPU:='N'} # GPU passthrough : "${GPU:='N'}" # GPU passthrough
: ${DISPLAY:='none'} # Display type : "${DISPLAY:='none'}" # Display type
if [[ "$GPU" != [Yy1]* ]] || [[ "$ARCH" != "amd64" ]]; then if [[ "$GPU" != [Yy1]* ]] || [[ "$ARCH" != "amd64" ]]; then

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -Eeuo pipefail set -Eeuo pipefail
: ${URL:=''} # URL of the PAT file to be downloaded. : "${URL:=''}" # URL of the PAT file to be downloaded.
if [ -f "$STORAGE/dsm.ver" ]; then if [ -f "$STORAGE/dsm.ver" ]; then
BASE=$(<"$STORAGE/dsm.ver") BASE=$(<"$STORAGE/dsm.ver")

View File

@ -3,17 +3,17 @@ set -Eeuo pipefail
# Docker environment variables # Docker environment variables
: ${DHCP:='N'} : "${DHCP:='N'}"
: ${MAC:='02:11:32:AA:BB:CC'} : "${MAC:='02:11:32:AA:BB:CC'}"
: ${VM_NET_DEV:=''} : "${VM_NET_DEV:=''}"
: ${VM_NET_TAP:='dsm'} : "${VM_NET_TAP:='dsm'}"
: ${VM_NET_MAC:="$MAC"} : "${VM_NET_MAC:="$MAC"}"
: ${VM_NET_HOST:='VirtualDSM'} : "${VM_NET_HOST:='VirtualDSM'}"
: ${DNSMASQ_OPTS:=''} : "${DNSMASQ_OPTS:=''}"
: ${DNSMASQ:='/usr/sbin/dnsmasq'} : "${DNSMASQ:='/usr/sbin/dnsmasq'}"
: ${DNSMASQ_CONF_DIR:='/etc/dnsmasq.d'} : "${DNSMASQ_CONF_DIR:='/etc/dnsmasq.d'}"
ADD_ERR="Please add the following setting to your container:" ADD_ERR="Please add the following setting to your container:"

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -Eeuo pipefail set -Eeuo pipefail
: ${DHCP:='N'} : "${DHCP:='N'}"
info () { printf "%b%s%b" "\E[1;34m \E[1;36m" "$1" "\E[0m\n" >&2; } info () { printf "%b%s%b" "\E[1;34m \E[1;36m" "$1" "\E[0m\n" >&2; }
error () { printf "%b%s%b" "\E[1;31m " "ERROR: $1" "\E[0m\n" >&2; } error () { printf "%b%s%b" "\E[1;31m " "ERROR: $1" "\E[0m\n" >&2; }

View File

@ -3,10 +3,10 @@ set -Eeuo pipefail
# Docker environment variables # Docker environment variables
: ${KVM:='Y'} : "${KVM:='Y'}"
: ${HOST_CPU:=''} : "${HOST_CPU:=''}"
: ${CPU_MODEL:='host'} : "${CPU_MODEL:='host'}"
: ${CPU_FEATURES:='+ssse3,+sse4.1,+sse4.2'} : "${CPU_FEATURES:='+ssse3,+sse4.1,+sse4.2'}"
[ "$ARCH" != "amd64" ] && KVM="N" [ "$ARCH" != "amd64" ] && KVM="N"

View File

@ -11,15 +11,15 @@ trap 'error "Status $? while: $BASH_COMMAND (line $LINENO/$BASH_LINENO)"' ERR
# Docker environment variables # Docker environment variables
: ${TZ:=''} # System local timezone : "${TZ:=''}" # System local timezone
: ${DEBUG:='N'} # Disable debugging mode : "${DEBUG:='N'}" # Disable debugging mode
: ${COUNTRY:=''} # Country code for mirror : "${COUNTRY:=''}" # Country code for mirror
: ${CONSOLE:='N'} # Disable console mode : "${CONSOLE:='N'}" # Disable console mode
: ${ALLOCATE:=''} # Preallocate diskspace : "${ALLOCATE:=''}" # Preallocate diskspace
: ${ARGUMENTS:=''} # Extra QEMU parameters : "${ARGUMENTS:=''}" # Extra QEMU parameters
: ${CPU_CORES:='1'} # Amount of CPU cores : "${CPU_CORES:='1'}" # Amount of CPU cores
: ${RAM_SIZE:='1G'} # Maximum RAM amount : "${RAM_SIZE:='1G'}" # Maximum RAM amount
: ${DISK_SIZE:='16G'} # Initial data disk size : "${DISK_SIZE:='16G'}" # Initial data disk size
# Helper variables # Helper variables

View File

@ -3,11 +3,11 @@ set -Eeuo pipefail
# Docker environment variables # Docker environment variables
: ${HOST_MAC:=''} : "${HOST_MAC:=''}"
: ${HOST_DEBUG:=''} : "${HOST_DEBUG:=''}"
: ${HOST_SERIAL:=''} : "${HOST_SERIAL:=''}"
: ${HOST_MODEL:=''} : "${HOST_MODEL:=''}"
: ${GUEST_SERIAL:=''} : "${GUEST_SERIAL:=''}"
HOST_ARGS=() HOST_ARGS=()
HOST_ARGS+=("-cpu=$CPU_CORES") HOST_ARGS+=("-cpu=$CPU_CORES")