Dolphin keeps outdated paths (after Versetzung).
This commit is contained in:
parent
a2424a4a73
commit
8aca770c40
2 changed files with 37 additions and 0 deletions
32
roles/lmn_kde/files/lmn-fix-dolphin.sh
Executable file
32
roles/lmn_kde/files/lmn-fix-dolphin.sh
Executable file
|
@ -0,0 +1,32 @@
|
|||
#!/usr/bin/bash
|
||||
#
|
||||
# Dolphin keeps old paths after modifications.
|
||||
# Run with '--do-it' to really make the change.
|
||||
#
|
||||
set -eu
|
||||
|
||||
do="${1:-}"
|
||||
|
||||
bmk=".local/share/user-places.xbel"
|
||||
rt="/srv/samba/schools/default-school/students"
|
||||
|
||||
extract() {
|
||||
local grp="$1"
|
||||
grp="${grp##*${rt}/}"
|
||||
grp="${grp%%/*}"
|
||||
echo $grp
|
||||
}
|
||||
|
||||
for f in $(find $rt/*/*/$bmk) ; do
|
||||
cor="$(extract $f)"
|
||||
for l in "$(grep "$rt" "$f")" ; do
|
||||
fnd="$(extract "$l")"
|
||||
if [[ "$cor" != "$fnd" ]] ; then
|
||||
echo "Check ${f##*${rt}/}: '$cor' != '$fnd'."
|
||||
if [[ "$do" = "--do-it" ]] ; then
|
||||
sed -i.lmn-fix-path "s|$rt/$fnd|$rt/$cor|g" "$f"
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
done
|
|
@ -109,6 +109,11 @@
|
|||
AllowSuspendThenHibernate=no
|
||||
AllowHybridSleep=no
|
||||
|
||||
- name: Deploy dolphin script
|
||||
copy:
|
||||
src: lmn-fix-dolphin.sh
|
||||
dest: /usr/local/bin/
|
||||
mode: '0755'
|
||||
|
||||
################# general settings ##################
|
||||
- name: Enable boot splash screen
|
||||
|
|
Loading…
Add table
Reference in a new issue