Updated NIX build scripts

This commit is contained in:
Valentino Orlandi 2022-11-16 17:04:11 +01:00
parent 6ff955d380
commit 5142815f99
Signed by: elB4RTO
GPG Key ID: 1719E976DB2D4E71
2 changed files with 26 additions and 5 deletions

View File

@ -26,7 +26,7 @@ then
read agree
case "$agree"
in
"y" | "Y")
"y" | "Y" | [yY][eE][sS])
printf "\n"
break
;;
@ -41,7 +41,7 @@ fi
echo -e "\nStarting compilation process\n"
# Make a build folder
if [ -d build ]
if [ -e build ]
then
rm -r build
fi
@ -88,7 +88,7 @@ then
read agree
case "$agree"
in
"y" | "Y")
"y" | "Y" | [yY][eE][sS])
printf "\n"
cp --no-preserve=all ./logdoctor.conf ~/.config/LogDoctor/
if [[ "$?" != "0" ]]
@ -99,9 +99,12 @@ then
fi
break
;;
*)
"n" | "N" | [nN][oO])
break
;;
*)
echo "Invalid answer"
;;
esac
done
fi
@ -130,6 +133,15 @@ then
exit
fi
fi
for res in $(ls ./logdocdata)
do
rm -r ~/.local/share/LogDoctor/$res
if [[ "$?" != "0" ]]
then
echo -e "\nError: failed to remove old resources: ~/.local/share/LogDoctor/$res"
exit
fi
done
cp -r --no-preserve=all ./logdocdata/* ~/.local/share/LogDoctor/
if [[ "$?" != "0" ]]
then

View File

@ -27,7 +27,7 @@ fi
echo -e "\nStarting compilation process\n"
# Make a build folder
if [ -d build ]
if [ -e build ]
then
rm -r build
fi
@ -72,6 +72,15 @@ then
exit
fi
fi
for res in $(ls ./logdocdata)
do
rm -r ~/.local/share/LogDoctor/$res
if [[ "$?" != "0" ]]
then
echo -e "\nError: failed to remove old resources: ~/.local/share/LogDoctor/$res"
exit
fi
done
cp -r --no-preserve=all ./logdocdata/* ~/.local/share/LogDoctor/
if [[ "$?" != "0" ]]
then