mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 04:43:03 +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
|
# Install script for FirebirdSQL database engine
|
||||||
# http://www.firebirdsql.org
|
# http://www.firebirdsql.org
|
||||||
|
|
||||||
|
parseArgs ${*}
|
||||||
InteractiveInstall=1
|
|
||||||
export InteractiveInstall
|
|
||||||
|
|
||||||
|
|
||||||
checkInstallUser
|
checkInstallUser
|
||||||
|
|
||||||
@ -38,25 +35,24 @@ CpuType=@CPU_TYPE@
|
|||||||
|
|
||||||
Version="$BuildVersion-$PackageVersion.$CpuType"
|
Version="$BuildVersion-$PackageVersion.$CpuType"
|
||||||
|
|
||||||
|
if [ ! -z "$InteractiveInstall" ]
|
||||||
|
then
|
||||||
|
cat <<EOF
|
||||||
|
|
||||||
cat <<EOF
|
Firebird classic $Version Installation
|
||||||
|
|
||||||
Firebird @FIREBIRD_ARCH_TYPE@ $Version Installation
|
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
AskQuestion "Press Enter to start installation or ^C to abort"
|
||||||
|
fi
|
||||||
AskQuestion "Press Enter to start installation or ^C to abort"
|
|
||||||
|
|
||||||
|
|
||||||
# Here we are installing from a install tar.gz file
|
# Here we are installing from a install tar.gz file
|
||||||
|
|
||||||
if [ -e scripts ]; then
|
if [ -e scripts ]; then
|
||||||
echo "Extracting install data"
|
displayMessage "Extracting install data"
|
||||||
runAndCheckExit "./scripts/preinstall.sh"
|
runAndCheckExit "./scripts/preinstall.sh"
|
||||||
runAndCheckExit "./scripts/tarinstall.sh"
|
runAndCheckExit "./scripts/tarinstall.sh"
|
||||||
runAndCheckExit "./scripts/postinstall.sh"
|
runAndCheckExit "./scripts/postinstall.sh"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Install completed"
|
displayMessage "Install completed"
|
||||||
|
@ -25,10 +25,7 @@
|
|||||||
# UnInstall script for FirebirdSQL database engine
|
# UnInstall script for FirebirdSQL database engine
|
||||||
# http://www.firebirdsql.org
|
# http://www.firebirdsql.org
|
||||||
|
|
||||||
|
parseArgs ${*}
|
||||||
InteractiveInstall=1
|
|
||||||
export InteractiveInstall
|
|
||||||
|
|
||||||
|
|
||||||
checkInstallUser
|
checkInstallUser
|
||||||
|
|
||||||
@ -38,8 +35,9 @@ CpuType=@CPU_TYPE@
|
|||||||
|
|
||||||
Version="$BuildVersion-$PackageVersion.$CpuType"
|
Version="$BuildVersion-$PackageVersion.$CpuType"
|
||||||
|
|
||||||
|
if [ ! -z "$InteractiveInstall" ]
|
||||||
cat <<EOF
|
then
|
||||||
|
cat <<EOF
|
||||||
|
|
||||||
Firebird @FIREBIRD_ARCH_TYPE@ $Version Uninstall program
|
Firebird @FIREBIRD_ARCH_TYPE@ $Version Uninstall program
|
||||||
|
|
||||||
@ -47,10 +45,8 @@ Are you sure you want to proceed?
|
|||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
AskQuestion "Press Enter to start uninstall or ^C to abort"
|
||||||
|
fi
|
||||||
AskQuestion "Press Enter to start uninstall or ^C to abort"
|
|
||||||
|
|
||||||
|
|
||||||
# Here we are uninstalling from a install tar.gz file
|
# Here we are uninstalling from a install tar.gz file
|
||||||
|
|
||||||
@ -59,7 +55,7 @@ scriptsDir=@FB_MISCDIR@/scripts
|
|||||||
|
|
||||||
if [ -e $scriptsDir ]
|
if [ -e $scriptsDir ]
|
||||||
then
|
then
|
||||||
echo "Extracting install data"
|
displayMessage "Extracting install data"
|
||||||
|
|
||||||
runAndCheckExit "$scriptsDir/preuninstall.sh"
|
runAndCheckExit "$scriptsDir/preuninstall.sh"
|
||||||
runAndCheckExit "$scriptsDir/postuninstall.sh"
|
runAndCheckExit "$scriptsDir/postuninstall.sh"
|
||||||
@ -70,4 +66,4 @@ if [ -e $scriptsDir ]
|
|||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Uninstall completed"
|
displayMessage "Uninstall completed"
|
||||||
|
@ -830,3 +830,32 @@ updateInetdServiceEntry() {
|
|||||||
fi
|
fi
|
||||||
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