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

podminky pro spusteni funkce createSymlinks presunuty do tela funkce; zmena nazvu funkce

parent 0ebcb938
No related branches found
No related tags found
No related merge requests found
......@@ -189,7 +189,7 @@ doTemplate()
}
cleanOldFiles()
removeOldFiles()
{
echo -n "Removing old package files ... "
rm -f "${etc}/warden-client.conf" 2> /dev/null
......@@ -210,12 +210,17 @@ createManifest()
createSymlinks()
{
echo "Creating symbolic links to $symbin ..."
for file in "${bin}/"*
do
echo "- making symlink: ${symbin}/${file##*/} -> $file"
ln -s "$file" "${symbin}/${file##*/}"
done
echo -n "Checking symbolic links directory $symbin ... "
if [[ -d $symbin && -w $symbin ]]; then
echo "OK"
for file in "${bin}/"*
do
echo "- making symlink: ${symbin}/${file##*/} -> $file"
ln -s "$file" "${symbin}/${file##*/}"
done
else
echo "FAILED!"
fi
}
......@@ -391,14 +396,14 @@ else
> $watchdog_conf && echo "OK" || errClean
fi
# cleaning of files from old package - depend on package version
cleanOldFiles
# remove files of old packages - file list depend on package version
removeOldFiles
# create MANIFEST file
createManifest
# crate symlinks from warden server bin to user path (if -s option is set)
[[ ! -z "$symbin" ]] && [[ -d "$symbin" ]] && [[ -w "$symbin" ]] && createSymlinks
[[ ! -z "$symbin" ]] && createSymlinks
echo
echo "------------------------- Summary ---------------------------------------"
......
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