commit e7d8c65563011a345b81fd117a3be61eb4bc953d
parent bedd4bfd7b1f93e0e1cb6fc4ab86f38172f8b24f
Author: Jan Pobrislo <ccx@webprojekty.cz>
Date: Mon, 25 Jul 2022 18:18:35 +0200
Resolve paths properly
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/postinstall b/postinstall
@@ -50,11 +50,11 @@ symlink_static_file() {
rel1=./conf/static$1
[[ -f $rel1 ]] || die111 "Cannot symlink: file does not exist: ${(qqq)rel1}"
relative_base=$1:h
- until [[ ${${:-$relative_base/$up}:a} == / ]] ; do
+ until [[ ${${:-$relative_base/$up}:P} == / ]] ; do
up=../$up
done
rel2=$relative_base/$up/current/conf/static$1
- [[ $rel1:a == $rel2:a ]] || die "Directory mismatch"
+ [[ $rel1:P == $rel2:P ]] || die "Directory mismatch"
if [[ ! -L $1 && -f $1 ]]; then
mv $1 $1.orig.$EPOCHSECONDS || exit $?