Solved shellcheck errors

This commit is contained in:
Kevin Veen-Birkenbach 2020-05-05 11:50:20 +02:00
parent e42a931032
commit 54f550e566
5 changed files with 11 additions and 8 deletions

View File

@ -1,5 +1,6 @@
#!/bin/bash
# @author Kevin Veen-Birkenbach
# shellcheck disable=SC2015 # Deactivating bool hint
# shellcheck source=/dev/null # Deactivate SC1090
source "$(dirname "$(readlink -f "${0}")")/../base.sh" || (echo "Loading base.sh failed." && exit 1)

View File

@ -3,6 +3,7 @@
# Locks the data
# @author Kevin Veen-Birkenbach [aka. Frantz]
#
# shellcheck disable=SC2015 # Deactivating bool hint
# shellcheck source=/dev/null # Deactivate SC1090
source "$(dirname "$(readlink -f "${0}")")/../base.sh" || (echo "Loading base.sh failed." && exit 1)
info "Locking directory $DECRYPTED_PATH..." &&

View File

@ -4,6 +4,7 @@
# @author Kevin Veen-Birkenbach [aka. Frantz]
#
# shellcheck source=/dev/null # Deactivate SC1090
# shellcheck disable=SC2015 # Deactivating bool hint
source "$(dirname "$(readlink -f "${0}")")/../base.sh" || (echo "Loading base.sh failed." && exit 1)
info "Unlocking directory $DECRYPTED_PATH..."
if [ ! -d "$DECRYPTED_PATH" ]

View File

@ -14,17 +14,17 @@ while [ \! -b "$ifi" ]
done
while [ "$path" == "" ]
do
echo "Bitte Backupimagepfad+Namen zu $(pwd) eingeben:"
read path
echo "Bitte Backupimagepfad+Namen zu $PWD eingeben:"
read -r path
if [ "${path:0:1}" == "/" ]
then
ofi=$path.img
ofi="$path.img"
else
ofi=$(pwd)"/"$path.img
ofi="$PWD/$path.img"
fi
done
info "Input file: $ifi"
info "Output file: $ofi"
question "Please confirm by pushing \"Enter\". To cancel use \"Ctrl + Alt + C\""
read bestaetigung
dd if=$ifi of=$ofi bs=1M status=progress
read -r bestaetigung
dd if="$ifi" of="$ofi" bs=1M status=progress

View File

@ -38,8 +38,8 @@
mkdir -p /mnt/raspbian
# mount partition
mount -o rw ${1}2 /mnt/raspbian
mount -o rw ${1}1 /mnt/raspbian/boot
mount -o rw "$1""2" /mnt/raspbian
mount -o rw "$1""1" /mnt/raspbian/boot
# mount binds
mount --bind /dev /mnt/raspbian/dev/