-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy path70-qgis.sh
More file actions
executable file
·26 lines (22 loc) · 1.16 KB
/
70-qgis.sh
File metadata and controls
executable file
·26 lines (22 loc) · 1.16 KB
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
# Copyright (c) 2023 b-data GmbH.
# Distributed under the terms of the MIT License.
set -e
if [ "$(id -u)" == 0 ] ; then
# Put inital QGIS settings in place
run_user_group mkdir -p "/home/$NB_USER${DOMAIN:+@$DOMAIN}/.local/share/QGIS/QGIS3/profiles/default/QGIS"
if [[ ! -f "/home/$NB_USER${DOMAIN:+@$DOMAIN}/.local/share/QGIS/QGIS3/profiles/default/QGIS/QGIS3.ini" ]]; then
run_user_group cp -a --no-preserve=ownership \
/var/backups/skel/.local/share/QGIS/QGIS3/profiles/default/QGIS/QGIS3.ini \
"/home/$NB_USER${DOMAIN:+@$DOMAIN}/.local/share/QGIS/QGIS3/profiles/default/QGIS/QGIS3.ini"
fi
run_user_group mkdir -p "/home/$NB_USER${DOMAIN:+@$DOMAIN}/.local/share/QGIS/QGIS3/profiles/default/python/plugins"
else
# Put inital QGIS settings in place
mkdir -p "$HOME/.local/share/QGIS/QGIS3/profiles/default/QGIS"
if [[ ! -f "$HOME/.local/share/QGIS/QGIS3/profiles/default/QGIS/QGIS3.ini" ]]; then
cp -a /var/backups/skel/.local/share/QGIS/QGIS3/profiles/default/QGIS/QGIS3.ini \
"$HOME/.local/share/QGIS/QGIS3/profiles/default/QGIS/QGIS3.ini"
fi
mkdir -p "$HOME/.local/share/QGIS/QGIS3/profiles/default/python/plugins"
fi