mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 02:03:04 +01:00
Frontported CORE-3467: provide a silent install switch
This commit is contained in:
parent
190abcf635
commit
68e7cd9461
@ -25,10 +25,7 @@
|
||||
# Install script for FirebirdSQL database engine
|
||||
# http://www.firebirdsql.org
|
||||
|
||||
|
||||
InteractiveInstall=1
|
||||
export InteractiveInstall
|
||||
|
||||
parseArgs ${*}
|
||||
|
||||
checkInstallUser
|
||||
|
||||
@ -38,25 +35,24 @@ CpuType=@CPU_TYPE@
|
||||
|
||||
Version="$BuildVersion-$PackageVersion.$CpuType"
|
||||
|
||||
if [ ! -z "$InteractiveInstall" ]
|
||||
then
|
||||
cat <<EOF
|
||||
|
||||
cat <<EOF
|
||||
|
||||
Firebird @FIREBIRD_ARCH_TYPE@ $Version Installation
|
||||
Firebird classic $Version Installation
|
||||
|
||||
EOF
|
||||
|
||||
|
||||
|
||||
AskQuestion "Press Enter to start installation or ^C to abort"
|
||||
|
||||
AskQuestion "Press Enter to start installation or ^C to abort"
|
||||
fi
|
||||
|
||||
# Here we are installing from a install tar.gz file
|
||||
|
||||
if [ -e scripts ]; then
|
||||
echo "Extracting install data"
|
||||
displayMessage "Extracting install data"
|
||||
runAndCheckExit "./scripts/preinstall.sh"
|
||||
runAndCheckExit "./scripts/tarinstall.sh"
|
||||
runAndCheckExit "./scripts/postinstall.sh"
|
||||
fi
|
||||
|
||||
echo "Install completed"
|
||||
displayMessage "Install completed"
|
||||
|
@ -25,10 +25,7 @@
|
||||
# UnInstall script for FirebirdSQL database engine
|
||||
# http://www.firebirdsql.org
|
||||
|
||||
|
||||
InteractiveInstall=1
|
||||
export InteractiveInstall
|
||||
|
||||
parseArgs ${*}
|
||||
|
||||
checkInstallUser
|
||||
|
||||
@ -38,8 +35,9 @@ CpuType=@CPU_TYPE@
|
||||
|
||||
Version="$BuildVersion-$PackageVersion.$CpuType"
|
||||
|
||||
|
||||
cat <<EOF
|
||||
if [ ! -z "$InteractiveInstall" ]
|
||||
then
|
||||
cat <<EOF
|
||||
|
||||
Firebird @FIREBIRD_ARCH_TYPE@ $Version Uninstall program
|
||||
|
||||
@ -47,10 +45,8 @@ Are you sure you want to proceed?
|
||||
|
||||
EOF
|
||||
|
||||
|
||||
|
||||
AskQuestion "Press Enter to start uninstall or ^C to abort"
|
||||
|
||||
AskQuestion "Press Enter to start uninstall or ^C to abort"
|
||||
fi
|
||||
|
||||
# Here we are uninstalling from a install tar.gz file
|
||||
|
||||
@ -59,7 +55,7 @@ scriptsDir=@FB_MISCDIR@/scripts
|
||||
|
||||
if [ -e $scriptsDir ]
|
||||
then
|
||||
echo "Extracting install data"
|
||||
displayMessage "Extracting install data"
|
||||
|
||||
runAndCheckExit "$scriptsDir/preuninstall.sh"
|
||||
runAndCheckExit "$scriptsDir/postuninstall.sh"
|
||||
@ -70,4 +66,4 @@ if [ -e $scriptsDir ]
|
||||
|
||||
fi
|
||||
|
||||
echo "Uninstall completed"
|
||||
displayMessage "Uninstall completed"
|
||||
|
@ -830,3 +830,32 @@ updateInetdServiceEntry() {
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# parseArgs
|
||||
# Parse passed arguments.
|
||||
# Set appropriate global flags.
|
||||
|
||||
parseArgs() {
|
||||
flSilent=0
|
||||
|
||||
while [ -n "$1" ]; do
|
||||
case $1 in
|
||||
-silent)
|
||||
flSilent=1
|
||||
;;
|
||||
*)
|
||||
echo "Invalid option: $1. Known option is '-silent'."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if [ $flSilent -eq 0 ]; then
|
||||
InteractiveInstall=1
|
||||
export InteractiveInstall
|
||||
fi
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user