From a49bc7da29d7ada77b9145c8e801d4d79a7a9f19 Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Tue, 9 Jun 2020 14:19:47 -0700 Subject: [PATCH] shlib/install: make file of empty lines available for input Signed-off-by: Kyle J. McKay --- install.sh | 3 +++ shlib.sh | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/install.sh b/install.sh index 349d20e..9eeb8de 100755 --- a/install.sh +++ b/install.sh @@ -592,6 +592,9 @@ chown_make apache.conf chown_make src rm -fr "$basedir" mkdir -p "$basedir" "$basedir/gitweb" "$basedir/cgi" +# make the mtlinesfile with 1000 empty lines +yes '' | dd bs=1000 count=1 2>/dev/null >"$basedir/mtlinesfile" +chmod a+r "$basedir/mtlinesfile" cp cgi/*.cgi "$basedir/cgi" cp -pR Girocco jobd taskd html jobs toolbox hooks apache.conf shlib.sh bin screen "$basedir" find -H "$basedir" -type l -exec rm -f '{}' + diff --git a/shlib.sh b/shlib.sh index a8d496c..b65bb1e 100644 --- a/shlib.sh +++ b/shlib.sh @@ -198,6 +198,12 @@ git_add_config() { export GIT_CONFIG_PARAMETERS } +# file of empty lines +mtlinesfile="$cfg_basedir/mtlinesfile" +# created by installer, but if not exists, set to /dev/null +[ -e "$mtlinesfile" ] && [ -f "$mtlinesfile" ] && [ -r "$mtlinesfile" ] || + mtlinesfile='/dev/null' + # Make sure we have a reproducible environment by using a controlled HOME dir XDG_CONFIG_HOME="$cfg_chroot/var/empty" HOME="$cfg_chroot/etc/girocco" -- 2.11.4.GIT