diff options
author | Lyndon Brown <jnqnfe@gmail.com> | 2020-03-01 05:59:12 +0000 |
---|---|---|
committer | Luca Boccassi <bluca@debian.org> | 2020-03-05 21:04:23 +0000 |
commit | 450fb25fbd0fa35d7d0db7789344935caa04f355 (patch) | |
tree | 1d327617d7546eda8a7a09eb5fcc31e28151e98c /scripts | |
parent | f3209fead217bc82754e6827330299eba4ac12ca (diff) | |
download | vyos-live-build-450fb25fbd0fa35d7d0db7789344935caa04f355.tar.gz vyos-live-build-450fb25fbd0fa35d7d0db7789344935caa04f355.zip |
binary_onie: fix lack of newline on error
this script outputs a series of progressive dots as progress is made,
finally terminated with ' done.'. however if an error occurs then the
error would end up being printed directly on the end of this instead of
on a new line since newlines are not printed after each dot. this fixes
this oversight.
Gbp-Dch: Short
Closes: #952883
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build/binary_onie | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/build/binary_onie b/scripts/build/binary_onie index 16b86bcdd..a474ac17b 100755 --- a/scripts/build/binary_onie +++ b/scripts/build/binary_onie @@ -208,6 +208,7 @@ case $(file --brief --mime --dereference $EXTRACTDIR/live/initrd.img | \ COMPRESS="cat" ;; *) + echo "" #force newline Echo_error "Unable to detect initrd compression format." exit 1 ;; @@ -227,12 +228,14 @@ echo -n "." KERNEL='vmlinuz' IN_KERNEL=$EXTRACTDIR/live/$KERNEL [ -r $IN_KERNEL ] || { + echo "" #force newline Echo_error "Unable to find kernel in ISO: $IN_KERNEL" exit 1 } INITRD='initrd.img' IN_INITRD=$WORKDIR/$INITRD [ -r $IN_INITRD ] || { + echo "" #force newline Echo_error "Unable to find initrd in ISO: $IN_INITRD" exit 1 } @@ -305,11 +308,13 @@ echo -n "." # Repackage $INSTALLDIR into a self-extracting installer image sharch="$WORKDIR/sharch.tar" tar -C $WORKDIR -cf $sharch installer || { + echo "" #force newline Echo_error "Problems creating $sharch archive" exit 1 } [ -f "$sharch" ] || { + echo "" #force newline Echo_error "$sharch not found" exit 1 } @@ -319,6 +324,7 @@ sha1=$(cat $sharch | sha1sum | awk '{print $1}') echo -n "." cp sharch_body.sh $output_file || { + echo "" #force newline Echo_error "Problems copying sharch_body.sh" exit 1 } |