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

pridano kopirovani uninstall.sh skriptu do nainstalovaneho warden-client balicku; zmena vypisu

parent 2df7ab2f
No related branches found
No related tags found
No related merge requests found
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
# otherwise) arising in any way out of the use of this software, even # otherwise) arising in any way out of the use of this software, even
# if advised of the possibility of such damage. # if advised of the possibility of such damage.
VERSION="1.0.0" VERSION="1.1.0"
err() err()
{ {
...@@ -52,7 +52,7 @@ err() ...@@ -52,7 +52,7 @@ err()
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# edit when you build new package # edit when you build new package
version="1.0.1" version="1.1.0"
package_name="warden-client" package_name="warden-client"
package="$package_name-$version" package="$package_name-$version"
......
...@@ -185,14 +185,20 @@ installation_dir_chck() ...@@ -185,14 +185,20 @@ installation_dir_chck()
make_warden_dir() make_warden_dir()
{ {
echo -n "Making warden client directory ... " echo -n "Creating warden client directory ... "
cp -R `dirname $0`/warden-client $prefix 2> $err; ret_val=`echo $?` cp -R `dirname $0`/warden-client $prefix 2> $err; ret_val=`echo $?`
if [ $ret_val -eq 0 ]; then if [ $ret_val -eq 0 ]; then
echo "OK" echo "OK"
else else
err_clean err_clean
fi fi
cp -u CHANGELOG INSTALL LICENSE README README.cesnet "$client_path/doc"
files=(CHANGELOG INSTALL LICENSE README README.cesnet)
for file in ${files[@]};
do
cp -u "`dirname $0`/$file" "$client_path/doc"
done
cp -u "`dirname $0`/uninstall.sh" "$client_path"
} }
......
...@@ -169,7 +169,7 @@ uninstall_warden-client() ...@@ -169,7 +169,7 @@ uninstall_warden-client()
else else
err_clean err_clean
fi fi
}
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# MAIN # MAIN
...@@ -205,10 +205,19 @@ backup_dir="/tmp/warden-backup" ...@@ -205,10 +205,19 @@ backup_dir="/tmp/warden-backup"
echo echo
echo "------------------------- Uninstallation process --------------------------------" echo "------------------------- Uninstallation process --------------------------------"
# check if $prefix directory exist
installation_dir_chck installation_dir_chck
# check if $prefix/warden-client directory exist
warden_dir_chck warden_dir_chck
# make backup of currently installed warden-client package
backup backup
# do uninstallation
uninstall_warden-client uninstall_warden-client
echo echo
echo "Uninstallation was SUCCESSFUL!!!" echo "Uninstallation was SUCCESSFUL!!!"
......
...@@ -213,7 +213,13 @@ update_warden_dir() ...@@ -213,7 +213,13 @@ update_warden_dir()
else else
err_clean err_clean
fi fi
cp -u CHANGELOG INSTALL LICENSE README README.cesnet "$client_path/doc"
files=(CHANGELOG INSTALL LICENSE README README.cesnet)
for file in ${files[@]};
do
cp -u "`dirname $0`/$file" "$client_path/doc"
done
cp -u "`dirname $0`/uninstall.sh" "$client_path"
} }
......
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