Use temporary directory to mount image to
This commit is contained in:
parent
d3e1b918de
commit
858cf0ecc8
3 changed files with 4 additions and 2 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,5 +1,4 @@
|
|||
/deploy/
|
||||
/mnt/
|
||||
/rootfs/
|
||||
|
||||
.pc
|
||||
|
|
4
mkimg.sh
4
mkimg.sh
|
@ -55,6 +55,8 @@ if [ ! -d "$(dirname "$IMG_FILE")" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
export MOUNT_DIR="$(mktemp --directory)"
|
||||
|
||||
##
|
||||
# Prepare image file systems.
|
||||
#
|
||||
|
@ -134,3 +136,5 @@ umount "$MOUNT_DIR/boot/"
|
|||
umount "$MOUNT_DIR"
|
||||
zerofree -v "$ROOT_DEV"
|
||||
unmount_image "$IMG_FILE"
|
||||
|
||||
rmdir "$MOUNT_DIR"
|
||||
|
|
1
run
1
run
|
@ -10,7 +10,6 @@ export PASSWORD='password'
|
|||
|
||||
export DEPLOY_DIR="$BASE_DIR/deploy"
|
||||
export ROOTFS_DIR="$BASE_DIR/rootfs"
|
||||
export MOUNT_DIR="$BASE_DIR/mnt"
|
||||
export KEYS_DIR="$BASE_DIR/keys"
|
||||
export FILES_DIR="$BASE_DIR/files"
|
||||
|
||||
|
|
Reference in a new issue