Commit 9e940ea8 authored by Francesco Bonanno's avatar Francesco Bonanno

Enchanted Makefile to umount loop device if it was mounted from the build...

Enchanted Makefile to umount loop device if it was mounted from the build script, but the script failed to build
parent 2dc4a8f2
Pipeline #177 canceled with stages
in 55 seconds
......@@ -30,6 +30,7 @@ SHA1SUMIMG=$(IMAGENAME).sha1sum.txt
TARXZFILE=$(IMAGENAME).tar.xz
MD5SUMTARXZFILE=$(TARXZFILE).md5sum.txt
SHA1SUMTARXZFILE=$(TARXZFILE).sha1sum.txt
LOOPDEVICE=$$(losetup -O name -j $(IMAGENAME) | tail -1)
BLOCKDEVICE=
all:
......@@ -117,6 +118,10 @@ clean:
fi
clean1:
if [ ! -z $(LOOPDEVICE) ]; then \
sudo losetup -d $(LOOPDEVICE); true; \
fi
sudo lb clean --purge
rm -f $(BASEIMG)-*; true
rm -rf config; true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment