Skip to content
Snippets Groups Projects
Commit 4cda3838 authored by Tomáš Plesník's avatar Tomáš Plesník
Browse files

pridana kontrola parametru -d

parent ebd96528
No related branches found
No related tags found
No related merge requests found
...@@ -74,8 +74,8 @@ root_chck() ...@@ -74,8 +74,8 @@ root_chck()
params_chck() params_chck()
{ {
if [ -z $prefix ]; then if [ -z $prefix ]; then
prefix=/opt echo "Parameter -d <directory> is not set!"
echo "Warning: parameter -d <directory> is not set - default installation directory is ${prefix}!" exit 1
fi fi
if [ -z $key ]; then if [ -z $key ]; then
echo "Parameter -k <ssl_key_file> is not set!" echo "Parameter -k <ssl_key_file> is not set!"
......
...@@ -74,19 +74,21 @@ root_chck() ...@@ -74,19 +74,21 @@ root_chck()
params_chck() params_chck()
{ {
if [ -z $prefix ]; then if [ -z $prefix ]; then
prefix=/opt echo "Parameter -d <direcotry> is not set!"
echo "Warning: parameter -d <directory> is not set - default uninstallation directory is ${prefix}!" exit 1
fi fi
} }
obtain_package_version() obtain_package_version()
{ {
echo -n "Obtaing package version ... "
if [ -f $old_package_version_file ]; then if [ -f $old_package_version_file ]; then
package_version=`cat $old_package_version_file` package_version=`cat $old_package_version_file`
else else
package_version="unknown" package_version="unknown"
fi fi
echo "OK"
} }
......
...@@ -73,8 +73,8 @@ root_chck() ...@@ -73,8 +73,8 @@ root_chck()
params_chck() params_chck()
{ {
if [ -z $prefix ]; then if [ -z $prefix ]; then
prefix=/opt echo "Parameter -d <direcotry> is not set!"
echo "Warning: parameter -d <directory> is not set - default update directory is ${prefix}!" exit 1
fi fi
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment