-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathpost_install.sh
More file actions
26 lines (23 loc) · 954 Bytes
/
post_install.sh
File metadata and controls
26 lines (23 loc) · 954 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
# Post Installation script :::::::::::::::::::::::::::::::::::::::::::::::::::::
#
# ALPR
#
# The setup.sh file will find this post_install.sh file and execute it.
if [ "$1" != "post-install" ]; then
echo
read -t 3 -p "This script is only called from: bash ../../CodeProject.AI-Server/src/setup.sh"
echo
exit 1
fi
if [ "${os}" = "macos" ]; then
# We have a patch to apply for macOS due to a numpy upgrade that deprecates
# np.int that we can't downgrade
writeLine 'Applying PaddleOCR patch'
cp "${moduleDirPath}/patch/paddleocr-2.6.0.1/db_postprocess.py" "${packagesDirPath}/paddleocr/ppocr/postprocess/."
else
# We have a patch to apply for everyone else due to a bad truthy test on a
# multi-dimensional array in paddleocr 2.7.0.3
writeLine 'Applying PaddleOCR patch'
cp "${moduleDirPath}/patch/paddleocr-2.7.0.3/paddleocr.py" "${packagesDirPath}/paddleocr/."
fi