mirror of
https://github.com/kevinveenbirkenbach/raspberry-pi-tools.git
synced 2024-11-25 19:31:04 +01:00
Moeglichkeit verschiedene Images aufzuspielen implementiert
This commit is contained in:
parent
2945e6fd21
commit
847d386788
@ -42,9 +42,30 @@ while [ "$workingpath" == "" ]
|
||||
workingpath=""
|
||||
fi
|
||||
|
||||
done
|
||||
while [ "$imagepath" == "" ]
|
||||
do
|
||||
echo "Setzen Sie den Imagenamen(Standart:"$workingpath"ArchLinuxARM-rpi-2-latest.tar.gz)"
|
||||
read image
|
||||
if [ "$image" == "" ]
|
||||
then
|
||||
imagepath=$workingpath"ArchLinuxARM-rpi-2-latest.tar.gz"
|
||||
else
|
||||
imagepath=$workingpath$image
|
||||
fi
|
||||
if [ \! -f "$imagepath" ]
|
||||
then
|
||||
echo "Das ausgewaehlte Image existiert nicht!"
|
||||
#Image ggf. downloaden
|
||||
if [ \! -f "$imagepath" ]
|
||||
then
|
||||
echo "Image wird gedownloadet..."
|
||||
wget http://os.archlinuxarm.org/os/$image
|
||||
fi
|
||||
fi
|
||||
|
||||
done
|
||||
echo "Die Arbeitsvariablen werden gesetzt..."
|
||||
imagepath=$workingpath"ArchLinuxARM-rpi-2-latest.tar.gz"
|
||||
bootpath=$workingpath"boot"
|
||||
rootpath=$workingpath"root"
|
||||
if [ "${ofi:5:1}" != "s" ]
|
||||
@ -94,13 +115,6 @@ mkfs.ext4 $ofiroot
|
||||
mkdir $rootpath
|
||||
mount $ofiroot $rootpath
|
||||
|
||||
#Image ggf. downloaden
|
||||
if [ \! -f "$imagepath" ]
|
||||
then
|
||||
echo "Image wird gedownloadet..."
|
||||
wget http://os.archlinuxarm.org/os/ArchLinuxARM-rpi-2-latest.tar.gz
|
||||
fi
|
||||
|
||||
echo "Die Root-Dateien werden auf die SD-Karte aufgespielt..."
|
||||
bsdtar -xpf $imagepath -C $rootpath
|
||||
sync
|
||||
|
Loading…
Reference in New Issue
Block a user