pthbs

Packaging Through Hashed Build Scripts
git clone https://ccx.te2000.cz/git/pthbs
Log | Files | Refs | Submodules | README

commit a77efd2097d5dce7af7970d04b20a031f4213b87
parent 0d7f52668b46aea4aa5200d88fe981ef33f8e352
Author: Jan Pobrislo <ccx@te2000.cz>
Date:   Wed,  7 May 2025 21:26:30 +0000

Do not recreate existing environments

Diffstat:
Mcommand/pthbs-makegen | 13+++++++------
1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/command/pthbs-makegen b/command/pthbs-makegen @@ -113,14 +113,15 @@ function make_envfile( n, envfile, envhash) { for(n=1; n<=env_count; n++) { printf " %s", envdep[n] } - printf "\n\t@%s", "printf "q("Creating environment for %s => %s\\n")" "q(FILENAME)" "q("$(versions)/env."envhash) - printf "\n\t%s", "if test -e "q("$(versions)/env."envhash)"; then rm -r "q("$(versions)/env."envhash)"; fi" - printf "\n\t%s", "mkdir -p "q("$(versions)/env."envhash"/env") + printf "\n\t%s", "@if test -f "q("$@")"; then touch "q("$@")"; else" + printf " \\\n\t%s", "printf "q("Creating environment for %s => %s\\n")" "q(FILENAME)" "q("$(versions)/env."envhash) + printf " \\\n\t%s", "if test -e "q("$(versions)/env."envhash)"; then rm -r "q("$(versions)/env."envhash)"; fi" + printf " \\\n\t%s", "mkdir -p "q("$(versions)/env."envhash"/env") for(n=1; n<=env_count; n++) { - printf "\n\t%s", "pthbs-link "q("$(versions)/"env[n])" "q("$(versions)/env."envhash) + printf " \\\n\t%s", "pthbs-link "q("$(versions)/"env[n])" "q("$(versions)/env."envhash) } - printf "\n\t%s", "pthbs-enter-gen "q("$(versions)/env."envhash) - printf "\n\t%s\n\n", "sort -u <"q(envfile)" >"q("$@") + printf " \\\n\t%s", "pthbs-enter-gen "q("$(versions)/env."envhash) + printf " \\\n\t%s\n\n", "sort -u <"q(envfile)" >"q("$@")"; fi" printf "%s\n", "env_"envhash"_defined="ENVIRON["scriptname"] printf "%s\n", "endif" return envhash