#!/bin/bash
#
# patch 'Tausch' and 'Nextcloud' into dolphin's bookmarks
#
set -eu
file="${1:-$HOME/.local/share/user-places.xbel}"
[[ -e "$file" ]] || exit 0
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:]]+)true
    
   
  
+ 
+  Tausch
+  
+   
+    
+   
+   
+    $IDENTITY/${NUM1}
+    true
+   
+  
+ 
+ 
+  Nextcloud
+  
+   
+    
+   
+   
+    $IDENTITY/${NUM2}
+    true
+   
+  
+ 
  
   Network
   
    
     
"
echo "$patch" | patch -z '.lmn' --fuzz=0 --backup "$file"