-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathinstall_repos
executable file
·50 lines (40 loc) · 1.68 KB
/
install_repos
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/usr/bin/bash
################################################################################
# #
# Installation of several Odoo-Repositories that are commonly used #
# #
################################################################################
TARGETDIR="/usr/share"
REPOPREFIX='odoo'
echo "Installing additional repos"
sudo odooextras.py repos
echo "Installing requirements with apt"
sudo apt update
sudo apt --yes upgrade
for repo in $(ls $TARGETDIR | grep ^$REPOPREFIX) ; do
REQUIREMENTS=$TARGETDIR/$repo/apt-requirements.txt
if [ -f $REQUIREMENTS ] ; then
echo "Installing requirements from: "$REQUIREMENTS
xargs -a $REQUIREMENTS -- sudo apt --yes install
fi
done
echo "Installing requirements with pip3"
for repo in $(ls $TARGETDIR | grep ^$REPOPREFIX) ; do
REQUIREMENTS=$TARGETDIR/$repo/requirements.txt
if test -f $REQUIREMENTS ; then
echo "Installing requirements from: "$REQUIREMENTS
sudo pip3 install -r $REQUIREMENTS
fi
done
echo "changing name on excludes l10n_se module so that it doesn't conflict with our own l10n_se module"
FILE=/usr/share/core-odoo/addons/l10n_se
if [ -f "$FILE" ]; then
echo "$FILE exists. Changing name of $FILE"
sudo mv /usr/share/core-odoo/addons/l10n_se /usr/share/core-odoo/addons/exclude_l10n_se
fi
FILE2=/usr/share/core-odoo/addons/l10n_se_ocr
if [ -f "$FILE2" ]; then
echo "$FILE2 exists. Changing name of $FILE2"
sudo mv /usr/share/core-odoo/addons/l10n_se_ocr /usr/share/core-odoo/addons/exclude_l10n_se_ocr
fi
echo "Install done!"