umount $BASEDIR/build/tmp 2>/dev/null;
}
-now() {
- date -u "+%s"
-}
-
format_runtime() {
local seconds=${1}
esac
# Setup ccache cache size
- enterchroot ccache --max-size="${CCACHE_CACHE_SIZE}" >/dev/null
+ enterchroot ccache --max-size="${CCACHE_CACHE_SIZE}"
}
enterchroot() {
wait_until_finished() {
local pid=${1}
- local start_time=$(now)
+ local start_time="${SECONDS}"
# Show progress
if ${INTERACTIVE}; then
local runtime
while kill -0 ${pid} 2>/dev/null; do
- print_runtime $(( $(now) - ${start_time} ))
+ print_runtime $(( SECONDS - start_time ))
# Wait a little
sleep 1
local ret=$?
if ! ${INTERACTIVE}; then
- print_runtime $(( $(now) - ${start_time} ))
+ print_runtime $(( SECONDS - start_time ))
fi
return ${ret}
file_is_static() {
local file="${1}"
- file ${file} 2>/dev/null | grep -q "statically linked"
+ file -L "${file}" 2>/dev/null | grep -q "statically linked"
}
update_language_list() {
lfsmake2 tzdata
lfsmake2 cleanup-toolchain
lfsmake2 zlib
- lfsmake2 zstd
lfsmake2 autoconf
lfsmake2 automake
lfsmake2 libtool
lfsmake2 libxcrypt
lfsmake2 file
lfsmake2 gcc
+ lfsmake2 zstd
lfsmake2 sed
lfsmake2 berkeley
lfsmake2 coreutils
lfsmake2 python3-circuitbreaker
lfsmake2 python3-pytz
lfsmake2 python3-click
+ lfsmake2 python3-arrow
+ lfsmake2 python3-terminaltables
lfsmake2 aws-cli
lfsmake2 oci-python-sdk
lfsmake2 oci-cli
# See what we're supposed to do
case "$1" in
build)
- START_TIME=$(now)
+ START_TIME="${SECONDS}"
# Clear screen
${INTERACTIVE} && clear
tools/checkrootfiles
cd $PWD
- print_build_summary $(( $(now) - ${START_TIME} ))
+ print_build_summary $(( SECONDS - START_TIME ))
;;
shell)
# enter a shell inside LFS chroot