reproduce-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sr #110738] configure gets confused with a build dir with the same base


From: Boud Roukema
Subject: [sr #110738] configure gets confused with a build dir with the same base name as the current project
Date: Thu, 13 Oct 2022 19:22:49 -0400 (EDT)

Follow-up Comment #5, sr #110738 (project reproduce):

Please check commit fd1a226 [1]. For me this fixes the bug in which
'configure.sh' (called by './project') incorrectly claims that the build
directory is a subdirectory.

To see how this works, try

#!/bin/sh
currentdir=/home/user/myproj
printf "currentdir=$currentdir\n\n"
b="/home/user/myproj-build \
 /home/user/mypro \
 /home/user/myproj/ \
 /home/user/myproj \
 /home/user/myproj/build"
for bdir in $b; do
    printf "bdir=$bdir\n"
    if ! [ x"$bdir" = x ]; then
        if echo "$bdir/" \
                | grep '^'"$currentdir/" 2> /dev/null > /dev/null; then     
            printf "subdir? yes\n\n"
        else
            printf "subdir? no\n\n"
        fi
    fi
done


Optionally remove the '/' to get back to the test in maneage commit 4318670.

I'm not sure if this is what you were proposing, Raúl, since the slash is in
the regex, not in the parameter given to ./project. In any case, this works in
my testing.

[1]
https://codeberg.org/boud/maneage_dev/commit/fd1a226b54e285b2dae41d510341cb067d2153b7


    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/support/?110738>

_______________________________________________
Message sent via Savannah
https://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]