star-build

Automation tool for project installation
git clone git://git.meso-star.fr/star-build.git
Log | Files | Refs | README | LICENSE

commit 88d92b30b82f5138f11dd52825f203f06ba734e9
parent bfd999de2e1f48ec3fecf1dcc93349e4cc6983e5
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Thu, 25 Apr 2024 18:16:53 +0200

Add build script to generate a profile file

A build script does not necessarily install a profile file. In this
case, the user must enrich the environment variables to use the
installed resources (libraries, binaries, manual pages, etc.) if these
have been installed in directories other than the system directories.
This is not a defect of the build script: automatic installation of a
profile file only makes sense for deployment scripts for predefined
projects or development environments.

This commit provides a specific build script whose only action is to
install a profile file in accordance with the PREFIX macro. This allows
users to manually build their own project or development environment.

Diffstat:
M.gitignore | 1+
Asrc/profile.sh | 26++++++++++++++++++++++++++
2 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -6,6 +6,7 @@ .prefix build.mk local +profile */ !src/ *.sh.mk diff --git a/src/profile.sh b/src/profile.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +# Copyright (C) 2023, 2024 |Méso|Star> (contact@meso-star.com) +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +set -e + +[ -n "${PROFILE}" ] && return +export PROFILE=1 + +. "build.sh" + +# Generate a generic profile file simply named "profile" +profile profile