Version: 1.6.2 (using KDE KDE 3.5.6) Installed from: Compiled From Sources Compiler: gcc 3.4.6 OS: Solaris I get this error when building on Solaris 8 ./build_kexi_file.sh ./Simple_Database.kexi.sql ../../kexi/examples/Simple_Database.kexi ./build_kexi_file.sh: test: unknown operator -ot This is because the script: 1. Has #!/bin/sh as its first line. On Solaris /bin/sh is the Bourne shell, not bash 2. The script uses the test operator -ot which is not available in the Bourne shell I have worked around the problem by changing #!/bin/sh to #!/bin/bash
Thanks for reporting. I guess I cannot add dependency on bash but instead find a replacement for not portable commands. Before I am able to do this, I need assistance of a sh user. Note that all scripts in examples/ and tools/ need to be reviewed.
Same system, problem and solution here.
any assistance from solaris user on how to keep the script portable?
/bin/sh on Solaris does not support the -ot and -nt test operators. /usr/bin/test can be used instead while retaining /bin/sh. Here is a suggested patch: --- koffice-1.6.3/kexi/examples/build_kexi_file.sh 2008-01-30 12:19:04.582001168 +0530 +++ koffice-1.6.3/kexi/examples/build_kexi_file.sh.new 2008-01-30 12:45:58.466988954 +0530 @@ -22,7 +22,7 @@ kexi_file=$2 fi -if test -f "$kexi_file" -a ! "$kexi_file" -ot "$1" ; then +if /usr/bin/test -f "$kexi_file" -a "$kexi_file" -nt "$1" ; then echo "Local $kexi_file is newer than $1 - skipping it" exit 0 fi