Skip to content

Commit 3388de6

Browse files
committed
Do not assume FHS in scripts
On systems that do not follow the Filesystem Hierarchy Standard, such as guix, the hardcoded `/bin/pwd` will fail to be found so that the script will fail. Use `pwd`, instead, so that the command can be found through the normal path search mechanism. Change-Id: Ib5480aeda5ca9d241286be6d1f95e9a0810476a8 Reviewed-by: Joerg Bornemann <[email protected]>
1 parent 9a6c32b commit 3388de6

7 files changed

+8
-8
lines changed

bin/qmake-and-qtpaths-wrapper.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
# The directory of this script is the expanded absolute path of the "$qt_prefix/bin" directory.
44
script_dir_path=`dirname $0`
5-
script_dir_path=`(cd "$script_dir_path"; /bin/pwd)`
5+
script_dir_path=`(cd "$script_dir_path"; pwd)`
66

77
@host_qt_bindir@/@tool_name@@tool_version@ -qtconf "$script_dir_path/target_qt.conf" $*

bin/qt-cmake-create.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ HELP_MESSAGE="Usage
55

66
# The directory of this script is the expanded absolute path of the "$qt_prefix/bin" directory.
77
script_dir_path=`dirname $0`
8-
script_dir_path=`(cd "$script_dir_path"; /bin/pwd)`
8+
script_dir_path=`(cd "$script_dir_path"; pwd)`
99

1010
# Try to use original cmake, otherwise to make it relocatable, use any cmake found in PATH.
1111
original_cmake_path="@CMAKE_COMMAND@"

bin/qt-cmake.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# The directory of this script is the expanded absolute path of the "$qt_prefix/bin" directory.
44
script_dir_path=`dirname $0`
5-
script_dir_path=`(cd "$script_dir_path"; /bin/pwd)`
5+
script_dir_path=`(cd "$script_dir_path"; pwd)`
66

77
# Try to use original cmake, otherwise to make it relocatable, use any cmake found in PATH.
88
original_cmake_path="@CMAKE_COMMAND@"

bin/qt-configure-module.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
set -eu
33

44
script_dir_path=`dirname $0`
5-
script_dir_path=`(cd "$script_dir_path"; /bin/pwd)`
5+
script_dir_path=`(cd "$script_dir_path"; pwd)`
66

77
printUsage()
88
{

configure

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99

1010
# the directory of this script is the "source tree"
1111
relpath=`dirname "$0"`
12-
relpath=`(cd "$relpath"; /bin/pwd)`
12+
relpath=`(cd "$relpath"; pwd)`
1313
# the current directory is the "build tree" or "object tree"
14-
outpath=`/bin/pwd`
14+
outpath=`pwd`
1515
outpathPrefix=$outpath
1616

1717
# do this early so we don't store it in config.status
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/sh
22
script_dir_path=`dirname $0`
3-
script_dir_path=`(cd "$script_dir_path"; /bin/pwd)`
3+
script_dir_path=`(cd "$script_dir_path"; pwd)`
44

55
"$script_dir_path/@relative_path_from_libexec_dir_to_bin_dir@/qt-cmake" @script_passed_args@ "$@"
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/sh
22
script_dir_path=`dirname $0`
3-
script_dir_path=`(cd "$script_dir_path"; /bin/pwd)`
3+
script_dir_path=`(cd "$script_dir_path"; pwd)`
44

55
"$script_dir_path/@relative_path_from_libexec_dir_to_bin_dir@/qt-cmake" @script_passed_args@ "$@"

0 commit comments

Comments
 (0)