mirror of
https://github.com/OpenSolo/OpenSolo.git
synced 2025-05-01 15:14:35 +02:00
32 lines
800 B
Bash
Executable File
32 lines
800 B
Bash
Executable File
#!/bin/sh
|
|
|
|
#This script takes an updated image and pushes it
|
|
#on to the GOLDEN partition of the SD card, creating a
|
|
#new golden image. This should only be used for
|
|
#development and production.
|
|
|
|
#Make sure we're running on the update partition
|
|
BOOTPART=`grep 'boot' /proc/mounts | awk '{print $1}'`
|
|
|
|
if [ $BOOTPART == "/dev/mmcblk0p1" ]; then
|
|
echo "Already on golden partition"
|
|
exit
|
|
else
|
|
echo "Making the update partition the golden partition"
|
|
fi;
|
|
|
|
echo "Unmounting the golden partition"
|
|
umount /dev/mmcblk0p1
|
|
|
|
echo "Creating the golden partition filesystem"
|
|
mkfs.vfat /dev/mmcblk0p1 -n GOLDEN
|
|
|
|
echo "Mounting GOLDEN and copying files from LATEST"
|
|
mkdir -p golden
|
|
mount /dev/mmcblk0p1 golden
|
|
cp -r /mnt/boot/* golden/
|
|
umount golden
|
|
|
|
echo "All done! Run a factory reset if you'd like."
|
|
|