mirror of
https://github.com/kevinveenbirkenbach/raspberry-pi-tools.git
synced 2024-11-26 03:44:44 +01:00
Moeglichkeit verschiedene Images aufzuspielen implementiert
This commit is contained in:
parent
2945e6fd21
commit
847d386788
@ -42,9 +42,30 @@ while [ "$workingpath" == "" ]
|
|||||||
workingpath=""
|
workingpath=""
|
||||||
fi
|
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
|
done
|
||||||
echo "Die Arbeitsvariablen werden gesetzt..."
|
echo "Die Arbeitsvariablen werden gesetzt..."
|
||||||
imagepath=$workingpath"ArchLinuxARM-rpi-2-latest.tar.gz"
|
|
||||||
bootpath=$workingpath"boot"
|
bootpath=$workingpath"boot"
|
||||||
rootpath=$workingpath"root"
|
rootpath=$workingpath"root"
|
||||||
if [ "${ofi:5:1}" != "s" ]
|
if [ "${ofi:5:1}" != "s" ]
|
||||||
@ -94,13 +115,6 @@ mkfs.ext4 $ofiroot
|
|||||||
mkdir $rootpath
|
mkdir $rootpath
|
||||||
mount $ofiroot $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..."
|
echo "Die Root-Dateien werden auf die SD-Karte aufgespielt..."
|
||||||
bsdtar -xpf $imagepath -C $rootpath
|
bsdtar -xpf $imagepath -C $rootpath
|
||||||
sync
|
sync
|
||||||
|
Loading…
Reference in New Issue
Block a user