commit 64a18b0c09e69d64c5e855d8a80cdf9386a3a784
parent 4d63686fc540d853b3cb86184e2e3e77c79a8ae0
Author: Jan Pobříslo <ccx@te2000.cz>
Date: Sat, 10 Jun 2023 22:27:40 +0200
Fix creation of environments
Diffstat:
3 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/command/pthbs-install b/command/pthbs-install
@@ -14,7 +14,7 @@ fi
if test -e "$pthbs_versions/$pthbs_package"; then
N=1
- while "$pthbs_versions/$pthbs_package.$N"; do
+ while test -e "$pthbs_versions/$pthbs_package.$N"; do
N=$(1+$N)
done
echo >&2 "INFO: replacing previous package"
diff --git a/command/pthbs-link b/command/pthbs-link
@@ -1,5 +1,6 @@
#!/bin/sh -e
set -x
+test -d "$1" || exit 1
test -d "$2" || exit 1
while IFS= read -r line; do
target=${line% *}
diff --git a/command/pthbs-makegen b/command/pthbs-makegen
@@ -80,6 +80,7 @@ function make_envfile( n, envfile, envhash) {
for(n=1; n<=env_count; n++) {
printf " %s", envdep[n]
}
+ printf "\n\t%s", "mkdir -p "q("$(VERSIONS)/env."envhash)
for(n=1; n<=env_count; n++) {
printf "\n\t%s", "pthbs-link "q("$(VERSIONS)/"env[n])" "q("$(VERSIONS)/env."envhash)
}