bump to version 0.99.18

This commit is contained in:
fatalerrors
2022-06-24 17:52:17 +02:00
parent e8c6f46572
commit da37fd3bae
52 changed files with 1268 additions and 435 deletions

View File

@@ -1,7 +1,7 @@
# ------------------------------------------------------------------------------
# File manipulation function
# This file is part of the init.sh project
# Copyright (c) 2019-2021 Geoffray Levasseur <fatalerrors@geoffray-levasseur.org>
# Copyright (c) 2019-2022 Geoffray Levasseur <fatalerrors@geoffray-levasseur.org>
# ------------------------------------------------------------------------------
# This file is distributed under 3-clause BSD license.
# The complete license agreement can be obtained at:
@@ -9,6 +9,12 @@
# ------------------------------------------------------------------------------
# Some useful variables:
export HOST_REPO_PATH=${HOST_REPO_PATH:-"$MYPATH/repo/hosts/$HOSTNAME"}
export GROUP_REPO_PATH=${GROUP_REPO_PATH:-"$MYPATH/repo/groups"}
export COMM_REPO_PATH=${COMM_REPO_PATH:-"$MYPATH/repo/common"}
# ------------------------------------------------------------------------------
# Backup original installation files
# (or any old files if runned several time on same file)
@@ -55,10 +61,10 @@ export -f backup_dist
select_file()
{
local infile=$1
if [[ -f $MYPATH/repo/hosts/$HOSTNAME/$infile ]]; then
local source="$MYPATH/repo/hosts/$HOSTNAME/$infile"
elif [[ -f $MYPATH/repo/common/$infile ]]; then
local source="$MYPATH/repo/common/$infile"
if [[ -f $HOST_REPO_PATH/$infile ]]; then
local source="$HOST_REPO_PATH/$infile"
elif [[ -f $COMM_REPO_PATH/$infile ]]; then
local source="$COMM_REPO_PATH/$infile"
else
# Not found in repository, we expect full name
local source="$infile"
@@ -75,10 +81,10 @@ export -f select_file
select_directory()
{
local indir=$1
if [[ -d $MYPATH/repo/hosts/$HOSTNAME/$indir ]]; then
local source="$MYPATH/repo/hosts/$HOSTNAME/$indir"
elif [[ -d $MYPATH/repo/common/$indir ]]; then
local source="$MYPATH/repo/common/$indir"
if [[ -d $HOST_REPO_PATH/$indir ]]; then
local source="$HOST_REPO_PATH/$indir"
elif [[ -d $COMM_REPO_PATH/$indir ]]; then
local source="$COMM_REPO_PATH/$indir"
else
# Not found in repository, we expect full name
local source="$indir"
@@ -309,5 +315,7 @@ directory_must_exists()
fi
unset md
}
export -f directory_must_exists
# EOF