#!/bin/bash # # patch 'Tausch' and 'Nextcloud' into dolphin's bookmarks # set -eu file="${1:-$HOME/.local/share/user-places.xbel}" if grep -q "Tausch\|Nextcloud" "$file" ; then echo "Your Dolphin seems to already contain 'Tausch' and/or 'Nextcloud'." exit 0 fi id="$(grep ID "$file" | sed -E "s|^.+ID>([[:digit:]]+)/([[:digit:]]+) + Tausch + + + + + + $IDENTITY/${NUM1} + true + + + + + Nextcloud + + + + + + $IDENTITY/${NUM2} + true + + + Network " echo "$patch" | patch --fuzz=0 --backup "$file"