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