Add scripts
automates the process of overwriting the boot sector of the SD card and copying over the filesystem.
This commit is contained in:
19
sw/script/copy_files.sh
Normal file
19
sw/script/copy_files.sh
Normal file
@@ -0,0 +1,19 @@
|
||||
DEVICE=/dev/mmcblk0
|
||||
TMPMOUNT=/tmp/sd
|
||||
FSDIR=fsdir
|
||||
|
||||
V=
|
||||
|
||||
echo "$(tput bold setaf 11)Mounting Device$(tput sgr 0)"
|
||||
mkdir $V -p $TMPMOUNT
|
||||
sudo mount $V $DEVICE $TMPMOUNT
|
||||
echo
|
||||
|
||||
echo "$(tput bold setaf 11)Copying Files$(tput sgr 0)"
|
||||
sudo cp $V -r $FSDIR/* $TMPMOUNT
|
||||
echo
|
||||
|
||||
echo "$(tput bold setaf 11)Unmounting Device$(tput sgr 0)"
|
||||
sudo umount $V $DEVICE
|
||||
rmdir $V $TMPMOUNT
|
||||
echo
|
||||
Reference in New Issue
Block a user