5
0
Fork 0
mirror of https://codeberg.org/Computertruhe/Setup-Skripte.git synced 2025-06-28 11:26:18 +02:00

V2 Anfänge

This commit is contained in:
Robert 2024-10-22 22:03:22 +02:00
parent 74a9a97ca4
commit 9d2efcd48f
7 changed files with 247 additions and 22 deletions

26
installstick/test.sh Normal file
View file

@ -0,0 +1,26 @@
DSK=$(lsblk -l -oPATH,FSTYPE,TYPE -p /dev/sda |grep 'part')
Pp=()
Pt=()
IFS=$'\n' #newline ist separator (=ws wird mitgenommen)
pat='^([^ ]*) +([^ ]+) +.*$'
for line in $DSK; do
echo $line
if [[ $line =~ $pat ]]; then
#li=${BASH_REMATCH[1]}${BASH_REMATCH[2]};
pp=${BASH_REMATCH[1]}
fs=${BASH_REMATCH[2]}
#echo " pp $pp - fs $fs"
Pp+=($pp)
Pt+=($fs)
# Pp+=("")
fi
done
if [ "${Pt[0]}" != "vfdat" ]; then
echo "OK1"
fi
if [ "${Pt[1]}" == "btrdfs" ]; then
echo "OK2"
fi