-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #300 from Gottox/fix/unpack-empty-files
file_ext: make sure file is always initialized when running a multithreaded iterator.
- Loading branch information
Showing
3 changed files
with
34 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/sh -ex | ||
|
||
###################################################################### | ||
# @author Enno Boland ([email protected]) | ||
# @file repack.sh | ||
# @created Friday Mar 17, 2023 15:11:09 CET | ||
# | ||
# @description This script creates a squashfs image, mounts it, and | ||
# repacks it from the mounted path. | ||
###################################################################### | ||
|
||
: "${BUILD_DIR:?BUILD_DIR is not set}" | ||
: "${MKSQUASHFS:?MKSQUASHFS is not set}" | ||
: "${SQSH_UNPACK:?SQSH_UNPACK is not set}" | ||
|
||
MKSQUASHFS_OPTS="-no-xattrs -noappend -all-root -mkfs-time 0" | ||
|
||
WORK_DIR="$BUILD_DIR/unpack-empty_file" | ||
|
||
mkdir -p "$WORK_DIR" | ||
cd "$WORK_DIR" | ||
|
||
mkdir -p root unpack | ||
|
||
touch root/empty_file | ||
|
||
# shellcheck disable=SC2086 | ||
$MKSQUASHFS "root" "empty_file.squashfs" $MKSQUASHFS_OPTS | ||
|
||
$SQSH_UNPACK -Ve "$PWD/empty_file.squashfs" / "$PWD/unpack" |