diff options
| author | jandob | 2015-11-13 21:28:12 +0100 |
|---|---|---|
| committer | jandob | 2015-11-13 21:28:12 +0100 |
| commit | db059e0b1cc8ce7ac11a5e2c2412316249140921 (patch) | |
| tree | 95d165e5fdb7c95f372c39357464cc0bff355c5d /builder | |
| parent | Sync. (diff) | |
| download | systemd-init-db059e0b1cc8ce7ac11a5e2c2412316249140921.tar.gz systemd-init-db059e0b1cc8ce7ac11a5e2c2412316249140921.tar.xz systemd-init-db059e0b1cc8ce7ac11a5e2c2412316249140921.zip | |
use shell command grouping to simplify output redirection
Diffstat (limited to 'builder')
| -rwxr-xr-x | builder/build-initramfs.sh | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/builder/build-initramfs.sh b/builder/build-initramfs.sh index be1c57ca..5755e1da 100755 --- a/builder/build-initramfs.sh +++ b/builder/build-initramfs.sh @@ -186,27 +186,26 @@ EOF # # >>> build_initramfs_initialize_dracut # ... - mkdir dracut 1>"$UTILS_STANDARD_OUTPUT" 2>"$UTILS_ERROR_OUTPUT" && \ + { + mkdir dracut && \ utils_log 'Download and extract dracut.' && \ curl --location \ https://www.kernel.org/pub/linux/utils/boot/dracut/dracut-043.tar.gz | \ - tar --extract --gzip --directory dracut --strip-components 1 \ - 1>"$UTILS_STANDARD_OUTPUT" 2>"$UTILS_ERROR_OUTPUT" && \ - pushd dracut 1>"$UTILS_STANDARD_OUTPUT" 2>"$UTILS_ERROR_OUTPUT" && \ + tar --extract --gzip --directory dracut --strip-components 1 && \ + pushd dracut && \ # NOTE: On virtualbox shared folder symlinks are not allowed. # make the dracut-install binary (dracut-install resolves dependencies etc.) utils_log 'Compile dracut.' && \ - make install/dracut-install 1>"$UTILS_STANDARD_OUTPUT" \ - 2>"$UTILS_ERROR_OUTPUT" && \ + make install/dracut-install && \ # NOTE: We have to copy the binary to current instead of symlinking # them since this feature isn't supported in shared virtual box # machine folders. If symlinks would be available we could simply # use: # >>> make dracut-install - cp install/dracut-install dracut-install 1>"$UTILS_STANDARD_OUTPUT" \ - 2>"$UTILS_ERROR_OUTPUT" && \ - popd 1>"$UTILS_STANDARD_OUTPUT" 2>"$UTILS_ERROR_OUTPUT" + cp install/dracut-install dracut-install && \ + popd return $? + } 1>"$UTILS_STANDARD_OUTPUT" 2>"$UTILS_ERROR_OUTPUT" } function build_initramfs_create_qcow2_system() { # Packs current distribution in a qcow2 container. @@ -240,7 +239,7 @@ EOF "$dracut_modules_target")" != "$dracut_modules_source" ]] then ln --symbolic "$dracut_modules_source" "$dracut_modules_target" \ - 1>"$UTILS_STANDARD_OUTPUT" 2>"$UTILS_ERROR_OUTPUT" + 1>"$UTILS_STANDARD_OUTPUT" 2>"$UTILS_ERROR_OUTPUT" \ # NOTE: If you copy we would have to recompile each binaries every # time. #cp --recursive --force --no-target-directory \ |
