1 Do not assume FHS in scripts
2 3 On systems that do not follow the Filesystem Hierarchy Standard, such as
4 guix, the hardcoded `/bin/pwd` will fail to be found so that the script
5 will fail.
6 7 Use `pwd`, instead, so that the command can be found through the normal
8 path search mechanism.
9 10 See https://github.com/qt/qtbase/commit/3388de698bfb9bbc456c08f03e83bf3e749df35c.
11 12 diff --git a/qtbase/configure b/qtbase/configure
13 index 08b49a8d..faea5b55 100755
14 --- a/qtbase/configure
15 +++ b/qtbase/configure
16 @@ -9,9 +9,9 @@
17 18 # the directory of this script is the "source tree"
19 relpath=`dirname "$0"`
20 -relpath=`(cd "$relpath"; /bin/pwd)`
21 +relpath=`(cd "$relpath"; pwd)`
22 # the current directory is the "build tree" or "object tree"
23 -outpath=`/bin/pwd`
24 +outpath=`pwd`
25 outpathPrefix=$outpath
26 27 # do this early so we don't store it in config.status
28 29 --- a/qtbase/bin/qt-cmake.in
30 +++ b/qtbase/bin/qt-cmake.in
31 @@ -2,7 +2,7 @@
32 33 # The directory of this script is the expanded absolute path of the "$qt_prefix/bin" directory.
34 script_dir_path=`dirname $0`
35 -script_dir_path=`(cd "$script_dir_path"; /bin/pwd)`
36 +script_dir_path=`(cd "$script_dir_path"; pwd)`
37 38 # Try to use original cmake, otherwise to make it relocatable, use any cmake found in PATH.
39 original_cmake_path="@CMAKE_COMMAND@"
40 41 --- a/qtbase/bin/qt-configure-module.in
42 +++ b/qtbase/bin/qt-configure-module.in
43 @@ -2,7 +2,7 @@
44 set -eu
45 46 script_dir_path=`dirname $0`
47 -script_dir_path=`(cd "$script_dir_path"; /bin/pwd)`
48 +script_dir_path=`(cd "$script_dir_path"; pwd)`
49 50 printUsage()
51 {
52