Fixed NIX build scripts

Alternative for rsync not intalled
This commit is contained in:
Valentino Orlandi 2022-12-04 19:27:41 +01:00
parent 898ae3b20a
commit 5f9fba0ff8
Signed by: elB4RTO
GPG key ID: 1719E976DB2D4E71
2 changed files with 28 additions and 8 deletions

View file

@ -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

View file

@ -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