Solved shellcheck errors

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

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/