Add config file and force timestamp conditional option

This commit is contained in:
Melg Eight 2021-05-18 14:37:34 +03:00
parent fefb33a870
commit cf4ce56603
No known key found for this signature in database
GPG key ID: 8F73D998D1992669
4 changed files with 34 additions and 2 deletions

View file

@ -3,6 +3,7 @@
# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu>
# SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
# SPDX-FileCopyrightText: 2021 Paul Dersey <pdersey@gmail.com>
# SPDX-FileCopyrightText: 2021 Melg Eight <public.melg8@gmail.com>
#
# SPDX-License-Identifier: GPL-3.0-or-later
@ -149,3 +150,11 @@ call() {
default() {
"default_${build_stage}"
}
# Set all files modified dates to be 0 unix time.
# Should be called at the end of bootstrapping process.
# This function needs `touch` that supports --no-dereference
# (at least coreutils 8.1).
canonicalise_all_files_timestamp() {
find / -exec touch --no-dereference -t 197001010000.00 {} +
}

View file

@ -11,6 +11,8 @@ set -e
. helpers.sh
. bootstrap.cfg
build xz-5.0.5
build automake-1.11.2
@ -31,6 +33,11 @@ build mpfr-4.1.0
build mpc-1.2.1
if [ "$FORCE_TIMESTAMPS" = True ] ; then
echo 'Forcing all files timestamps to be 0 unix time.'
canonicalise_all_files_timestamp
fi
echo "Bootstrapping completed."
exec env - PATH=/after/bin PS1="\w # " bash -i