Files
super6502/sw/script/copy_files.sh
Byron Lathi 4e2e030e52 Add scripts
automates the process of overwriting the boot sector of the SD card and
copying over the filesystem.
2022-04-18 20:29:10 -05:00

19 lines
370 B
Bash

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