X-Git-Url: http://git.plutz.net/?p=serve0;a=blobdiff_plain;f=indexmeta.sh;h=fb893e14195bd8ba2554adb121097a5f8c021eb9;hp=00741d44881793000fce5b4f2e24142d8e6cf51f;hb=02812995d1df8b60f702be2ec8cf807782a7ab35;hpb=1b79a90402ee3fe450575085470b3ec6d084d78b diff --git a/indexmeta.sh b/indexmeta.sh index 00741d4..fb893e1 100644 --- a/indexmeta.sh +++ b/indexmeta.sh @@ -52,9 +52,9 @@ meta_purge(){ name="$(meta_name "$file")" if [ -d "${meta%/meta}" ] && LOCK "$meta"; then - grep -avF " ${name}" "$meta" >"$meta.tmp" - grep -aF " ${name}" "$meta" >>"$meta.trash" - mv "$meta.tmp" "$meta" + grep -avF " ${name}" "$meta" >"${meta}.tmp" + grep -aF " ${name}" "$meta" >>"${meta}.trash" + mv "${meta}.tmp" "$meta" RELEASE "$meta" fi } @@ -95,7 +95,8 @@ meta_dir(){ grep -qF " $(meta_name "$v")" "$meta" \ || meta_line "$v" done >>"$meta" - rm "$meta.ref" + sort -u "$meta" >"$meta.ref" + mv "$meta.ref" "$meta" RELEASE "$meta" fi