prevent multiple entries in bakkedup-desktop-files #1

Closed
rokosun wants to merge 1 commits from (deleted):rokosun-patch-1 into master

View File

@ -46,11 +46,13 @@ fixfiles() {
[ -f "$pacman_local/$name" ] ||
[ -f "$pacman_global/$name" ] ||
[ -f "$snap/$name" ] ||
mv "$file" "$file.bak" && echo "$line" >> "$data2"
{ mv "$file" "$file.bak" && echo "$line" >> "$data2"; }
done < "$data"
[ "$copied" = 'true' ] && [ "$(stat -c '%Y' "$data")" = "$lastmod" ] && sort "$tmp" | uniq > "$data"
[ -n "$(sort "$data2" | uniq -d)" ] && cp "$data2" "$tmp" && sort "$tmp" | uniq > "$data2"
for bakfile in "$user"/*.desktop.bak; do
origfile="${bakfile%.bak}"
[ -f "$origfile" ] && continue