mirror of
https://gitlab.com/mecatronyx/opencnc/experiments/opencn-rootfs.git
synced 2026-02-06 20:01:52 +08:00
23 lines
370 B
Bash
Executable File
23 lines
370 B
Bash
Executable File
#!/bin/bash
|
|
DEVLOOP=$(sudo losetup --partscan --find --show rootfs.img)
|
|
FS_IMG=rootfs.img
|
|
SCRIPT_IMG=./create_img.sh
|
|
|
|
if [ ! -f $FS_IMG ]; then
|
|
echo "Creating image"sh $FS_IMG
|
|
bash $SCRIPT_IMG $FS_IMG
|
|
|
|
if [ $? -ne 0 ]; then
|
|
echo "Error while creating image"
|
|
exit 1
|
|
fi
|
|
sleep 1
|
|
fi
|
|
|
|
#sudo losetup -P --find --show flash
|
|
mkdir -p fs
|
|
|
|
|
|
sudo mount ${DEVLOOP}p1 fs
|
|
|