Add utility to fix some locations
- some locations are automatically created by some programs and need to be "fixed" from time to time - Example: Gnome Seahorse (i.e., the passwords and keyrings application) uses ~/.pki by default but switches to $XDG_DATA_HOME/pki if it exists => we move the location to make everything $XDG compliant
This commit is contained in:
parent
5d5dd9d0bc
commit
a056361112
2 changed files with 18 additions and 0 deletions
|
@ -139,6 +139,23 @@ _restore_gnome() {
|
|||
|
||||
|
||||
|
||||
_fix_locations() {
|
||||
|
||||
# Gnome Seahorse (i.e., "Keyrings") uses ~/.pki by default but also
|
||||
# detects $XDG_DATA_HOME/pki if it is there and uses it insead;
|
||||
# setting this explicitly via an environment variable is not possible
|
||||
if [ -d "$HOME/.pki" ]; then
|
||||
if [ -d "$XDG_DATA_HOME/pki" ]; then
|
||||
echo "Warning: both $HOME/.pki and $XDG_DATA_HOME/pki exist!"
|
||||
else
|
||||
mv "$HOME/.pki" "$XDG_DATA_HOME/pki"
|
||||
fi
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
run-private-scripts() { # in the Nextcloud
|
||||
sudo --validate || return
|
||||
|
||||
|
@ -162,6 +179,7 @@ update-machine() {
|
|||
_update_zsh
|
||||
_update_python
|
||||
_restore_gnome
|
||||
_fix_locations
|
||||
run-private-scripts
|
||||
|
||||
sudo --reset-timestamp
|
||||
|
|
0
.local/share/pki/.gitkeep
Normal file
0
.local/share/pki/.gitkeep
Normal file
Loading…
Reference in a new issue