Fixed NIX build scripts
Alternative for rsync not intalled
This commit is contained in:
parent
898ae3b20a
commit
5f9fba0ff8
|
@ -102,11 +102,21 @@ then
|
|||
fi
|
||||
chmod 644 ./logdocdata/help/*/*
|
||||
chmod 444 ./logdocdata/licenses/*
|
||||
sudo rsync -r --delete ./logdocdata /usr/share/LogDoctor
|
||||
if [[ "$?" != "0" ]]
|
||||
if [[ $(which rsync) =~ ^/ ]]
|
||||
then
|
||||
echo "$(tput setaf 1)Error:$(tput sgr0) failed to copy LogDoctor's data"
|
||||
exit
|
||||
sudo rsync -r --delete ./logdocdata /usr/share/LogDoctor
|
||||
if [[ "$?" != "0" ]]
|
||||
then
|
||||
echo "$(tput setaf 1)Error:$(tput sgr0) failed to copy LogDoctor's data"
|
||||
exit
|
||||
fi
|
||||
else
|
||||
cp -r ./logdocdata/{help,licenses} /usr/share/LogDoctor
|
||||
if [[ "$?" != "0" ]]
|
||||
then
|
||||
echo "$(tput setaf 1)Error:$(tput sgr0) failed to copy LogDoctor's data"
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
|
|
@ -85,11 +85,21 @@ then
|
|||
fi
|
||||
chmod 644 ./logdocdata/help/*/*
|
||||
chmod 444 ./logdocdata/licenses/*
|
||||
sudo rsync -r --delete ./logdocdata /usr/share/LogDoctor
|
||||
if [[ "$?" != "0" ]]
|
||||
if [[ $(which rsync) =~ ^/ ]]
|
||||
then
|
||||
echo "$(tput setaf 1)Error:$(tput sgr0) failed to copy LogDoctor's data"
|
||||
exit
|
||||
sudo rsync -r --delete ./logdocdata /usr/share/LogDoctor
|
||||
if [[ "$?" != "0" ]]
|
||||
then
|
||||
echo "$(tput setaf 1)Error:$(tput sgr0) failed to copy LogDoctor's data"
|
||||
exit
|
||||
fi
|
||||
else
|
||||
cp -r ./logdocdata/{help,licenses} /usr/share/LogDoctor
|
||||
if [[ "$?" != "0" ]]
|
||||
then
|
||||
echo "$(tput setaf 1)Error:$(tput sgr0) failed to copy LogDoctor's data"
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue