Updated build scripts

This commit is contained in:
Valentino Orlandi 2023-01-12 23:03:50 +01:00
parent 506c3d2d45
commit 6537cb4dda
Signed by: elB4RTO
GPG Key ID: 1719E976DB2D4E71
4 changed files with 16 additions and 7 deletions

View File

@ -128,7 +128,7 @@ then
exit 1
fi
fi
if [ ! -e ~/"Lybrary/Application Support/LogDoctor/help" ]
if [ -e ~/"Lybrary/Application Support/LogDoctor/help" ]
then
rm -r ~/"Lybrary/Application Support/LogDoctor/help"
if [[ "$?" != "0" ]]
@ -145,20 +145,20 @@ then
fi
cp -r ./osx_bundle/* ../build/LogDoctor.app/Contents/
cp -r ./osx_bundle/{bin,doc,Resources,info.plist} ../build/LogDoctor.app/Contents/
if [ -e /Applications/LogDoctor.app ]
then
sudo rm -r /Applications/LogDoctor.app
if [[ "$?" != "0" ]]
then
echo "Error: failed to remove old bundle: /Applications/LogDoctor.app"
echo "Error: failed to remove old app bundle: /Applications/LogDoctor.app"
exit 1
fi
fi
sudo mv ../build/LogDoctor.app /Applications/
if [[ "$?" != "0" ]]
then
echo "Error: failed to copy the executable"
echo "Error: failed to copy the app bundle"
exit 1
fi

View File

@ -77,7 +77,7 @@ then
exit 1
fi
fi
if [ ! -e ~/"Lybrary/Application Support/LogDoctor/help" ]
if [ -e ~/"Lybrary/Application Support/LogDoctor/help" ]
then
rm -r ~/"Lybrary/Application Support/LogDoctor/help"
if [[ "$?" != "0" ]]
@ -94,12 +94,17 @@ then
fi
cp ./osx_bundle/* ../build/LogDoctor.app/Contents/
cp ./osx_bundle/{bin,doc,Resources,info.plist} ../build/LogDoctor.app/Contents/
sudo rm -r /Applications/LogDoctor.app
if [[ "$?" != "0" ]]
then
echo "Error: failed to remove the old app bundle"
exit 1
fi
sudo mv ../build/LogDoctor.app /Applications/
if [[ "$?" != "0" ]]
then
echo "Error: failed to copy the executable"
echo "Error: failed to copy the app bundle"
exit 1
fi

View File

@ -16,6 +16,8 @@ cd %logdocdir%
:: Check for a previous installation
IF EXIST "C:\Program Files\LogDoctor" (
ECHO Warning: a previous installation exists, please run the 'update' scripts instead
cd "%actual_path%"
PAUSE
EXIT /B 0
)

View File

@ -16,6 +16,8 @@ cd %logdocdir%
:: Check for a previous installation
IF NOT EXIST "C:\Program Files\LogDoctor" (
ECHO Warning: no previous installation detected, please run the 'install' scripts instead
cd "%actual_path%"
PAUSE
EXIT /B 0
)