2022-09-06 13:50:22 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
echo "This script builds arch-specific files, useful for firebird functionality"
|
2021-04-27 17:23:29 +02:00
|
|
|
|
|
|
|
runAndCheckExit() {
|
|
|
|
Msg=$1
|
|
|
|
Cmd=$2
|
|
|
|
|
|
|
|
echo $Msg please wait...
|
2022-09-02 03:45:47 +02:00
|
|
|
eval $Cmd
|
2021-04-27 17:23:29 +02:00
|
|
|
ExitCode=$?
|
|
|
|
|
|
|
|
if [ $ExitCode -ne 0 ]
|
|
|
|
then
|
|
|
|
echo "Aborted: The command $Cmd "
|
|
|
|
echo " failed with error code $ExitCode"
|
|
|
|
exit $ExitCode
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2022-09-02 01:51:12 +02:00
|
|
|
runAndCheckExit "Build messages file (firebird.msg)" "bin/build_file -f firebird.msg"
|
2022-09-02 03:45:47 +02:00
|
|
|
runAndCheckExit "Creating security database" "echo create database \'security5.fdb\'^ | bin/isql -q -term ^"
|
2022-09-02 01:51:12 +02:00
|
|
|
runAndCheckExit "Creating security database metadata" "bin/isql -q security5.fdb -i security.sql"
|
2022-09-02 03:45:47 +02:00
|
|
|
runAndCheckExit "Restore examples database (employee)" "(cd examples/empbuild ; ../../bin/isql -q -i ../../employe2.sql)"
|
2021-04-27 17:23:29 +02:00
|
|
|
|
2022-09-02 03:45:47 +02:00
|
|
|
rm -f security.sql employe2.sql bin/build_file AfterUntar.sh
|