mirror of
https://github.com/kevinveenbirkenbach/linux-image-manager.git
synced 2024-11-14 11:31:04 +01:00
Solved shellcheck errors
This commit is contained in:
parent
e42a931032
commit
54f550e566
@ -1,5 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# @author Kevin Veen-Birkenbach
|
# @author Kevin Veen-Birkenbach
|
||||||
|
# shellcheck disable=SC2015 # Deactivating bool hint
|
||||||
# shellcheck source=/dev/null # Deactivate SC1090
|
# shellcheck source=/dev/null # Deactivate SC1090
|
||||||
source "$(dirname "$(readlink -f "${0}")")/../base.sh" || (echo "Loading base.sh failed." && exit 1)
|
source "$(dirname "$(readlink -f "${0}")")/../base.sh" || (echo "Loading base.sh failed." && exit 1)
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
# Locks the data
|
# Locks the data
|
||||||
# @author Kevin Veen-Birkenbach [aka. Frantz]
|
# @author Kevin Veen-Birkenbach [aka. Frantz]
|
||||||
#
|
#
|
||||||
|
# shellcheck disable=SC2015 # Deactivating bool hint
|
||||||
# shellcheck source=/dev/null # Deactivate SC1090
|
# shellcheck source=/dev/null # Deactivate SC1090
|
||||||
source "$(dirname "$(readlink -f "${0}")")/../base.sh" || (echo "Loading base.sh failed." && exit 1)
|
source "$(dirname "$(readlink -f "${0}")")/../base.sh" || (echo "Loading base.sh failed." && exit 1)
|
||||||
info "Locking directory $DECRYPTED_PATH..." &&
|
info "Locking directory $DECRYPTED_PATH..." &&
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
# @author Kevin Veen-Birkenbach [aka. Frantz]
|
# @author Kevin Veen-Birkenbach [aka. Frantz]
|
||||||
#
|
#
|
||||||
# shellcheck source=/dev/null # Deactivate SC1090
|
# 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)
|
source "$(dirname "$(readlink -f "${0}")")/../base.sh" || (echo "Loading base.sh failed." && exit 1)
|
||||||
info "Unlocking directory $DECRYPTED_PATH..."
|
info "Unlocking directory $DECRYPTED_PATH..."
|
||||||
if [ ! -d "$DECRYPTED_PATH" ]
|
if [ ! -d "$DECRYPTED_PATH" ]
|
||||||
|
@ -14,17 +14,17 @@ while [ \! -b "$ifi" ]
|
|||||||
done
|
done
|
||||||
while [ "$path" == "" ]
|
while [ "$path" == "" ]
|
||||||
do
|
do
|
||||||
echo "Bitte Backupimagepfad+Namen zu $(pwd) eingeben:"
|
echo "Bitte Backupimagepfad+Namen zu $PWD eingeben:"
|
||||||
read path
|
read -r path
|
||||||
if [ "${path:0:1}" == "/" ]
|
if [ "${path:0:1}" == "/" ]
|
||||||
then
|
then
|
||||||
ofi=$path.img
|
ofi="$path.img"
|
||||||
else
|
else
|
||||||
ofi=$(pwd)"/"$path.img
|
ofi="$PWD/$path.img"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
info "Input file: $ifi"
|
info "Input file: $ifi"
|
||||||
info "Output file: $ofi"
|
info "Output file: $ofi"
|
||||||
question "Please confirm by pushing \"Enter\". To cancel use \"Ctrl + Alt + C\""
|
question "Please confirm by pushing \"Enter\". To cancel use \"Ctrl + Alt + C\""
|
||||||
read bestaetigung
|
read -r bestaetigung
|
||||||
dd if=$ifi of=$ofi bs=1M status=progress
|
dd if="$ifi" of="$ofi" bs=1M status=progress
|
||||||
|
@ -38,8 +38,8 @@
|
|||||||
mkdir -p /mnt/raspbian
|
mkdir -p /mnt/raspbian
|
||||||
|
|
||||||
# mount partition
|
# mount partition
|
||||||
mount -o rw ${1}2 /mnt/raspbian
|
mount -o rw "$1""2" /mnt/raspbian
|
||||||
mount -o rw ${1}1 /mnt/raspbian/boot
|
mount -o rw "$1""1" /mnt/raspbian/boot
|
||||||
|
|
||||||
# mount binds
|
# mount binds
|
||||||
mount --bind /dev /mnt/raspbian/dev/
|
mount --bind /dev /mnt/raspbian/dev/
|
||||||
|
Loading…
Reference in New Issue
Block a user