mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-05 04:06:33 +02:00
parent
8ab729ab98
commit
d250927093
@ -146,9 +146,6 @@ if [[ -e "$OUTPUT_DIR" ]]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# Be verbose to help debug failures.
|
||||
set -x
|
||||
|
||||
# Create the output directory.
|
||||
mkdir -p "$OUTPUT_DIR"
|
||||
|
||||
@ -577,6 +574,8 @@ if [ "$FLAGS_withdev" -eq "$FLAGS_TRUE" ]; then
|
||||
echo "Developer image created as $DEVELOPER_IMAGE_NAME"
|
||||
fi
|
||||
|
||||
print_time_elapsed
|
||||
|
||||
echo "To copy to USB keyfob, OUTSIDE the chroot, do something like:"
|
||||
echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdX"
|
||||
echo "To convert to VMWare image, OUTSIDE the chroot, do something like:"
|
||||
|
||||
12
common.sh
12
common.sh
@ -429,3 +429,15 @@ setup_symlinks_on_root() {
|
||||
|
||||
sudo ln -s "${var_target}" "${dev_image_root}/var"
|
||||
}
|
||||
|
||||
# Get current timestamp. Assumes common.sh runs at startup.
|
||||
start_time=$(date +%s)
|
||||
|
||||
# Print time elsapsed since start_time.
|
||||
print_time_elapsed() {
|
||||
end_time=$(date +%s)
|
||||
elapsed_seconds="$(( $end_time - $start_time ))"
|
||||
minutes="$(( $elapsed_seconds / 60 ))"
|
||||
seconds="$(( $elapsed_seconds % 60 ))"
|
||||
echo "Elapsed time: ${minutes}:${seconds}"
|
||||
}
|
||||
|
||||
@ -199,5 +199,8 @@ if [ "${VERIFY}" = "true" ]; then
|
||||
fi
|
||||
|
||||
cleanup
|
||||
|
||||
print_time_elapsed
|
||||
|
||||
trap - EXIT
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user