diff options
author | Aaron Ball <nullspoon@oper.io> | 2018-02-14 08:47:22 -0700 |
---|---|---|
committer | Aaron Ball <nullspoon@oper.io> | 2018-02-14 08:47:22 -0700 |
commit | 59173296aba560377f55dcc0527f2ddbb6c8d2ac (patch) | |
tree | f00340988168b550e3d3f5432c313ba3733d9e5d | |
parent | 629cc3bb9f858565f76d76315986c952974eae0b (diff) | |
download | pkgself-59173296aba560377f55dcc0527f2ddbb6c8d2ac.tar.gz pkgself-59173296aba560377f55dcc0527f2ddbb6c8d2ac.tar.xz |
install-header:changed dd extraction block size
Previously, we extracted block=1B * sizeof(chunk). This was extremely
slow. Changing block size to sizeof(chunk) and count to 1, the process
is sped up by about 200x.
-rwxr-xr-x | install-header.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/install-header.sh b/install-header.sh index a7b9269..b54a0ec 100755 --- a/install-header.sh +++ b/install-header.sh @@ -8,6 +8,8 @@ export SELF # Absolute path to the installer script (me!) export TMP # Path to tmp install staging directory export PAYLOAD # Path to the extracted payload directory export NOCLEANUP # Do not clean up deploy resources. Useful for debugging +export COMPRESS # Command to compress data +export DECOMPRESS # Command to decompress data # Header: 0 # runscript: 1 @@ -25,7 +27,7 @@ extract_chunk_index() { [ "${dest}" != '-' ] && of="of=${dest}" # Extract the requested chunk index - dd bs=1 count=${LENS[$index]} iflag=skip_bytes skip=${skip} \ + dd bs=${LENS[$index]} count=1 iflag=skip_bytes skip=${skip} \ if=${src} ${of} 2>/dev/null } |