From b8216f6dd92c288beaee2252e81efabfc3fd983e Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 13 Sep 2022 22:52:20 +0200 Subject: bin/curl: remove old wishes --- bin/curl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'bin/curl') diff --git a/bin/curl b/bin/curl index 1570da6..7199368 100755 --- a/bin/curl +++ b/bin/curl @@ -28,6 +28,12 @@ fi if [ -s "${work_dir}/files/${url}" ]; then cp "${work_dir}/files/${url}" "${file}" + if [ -s "${work_dir}/wishlist" ]; then + grep -vxF "${url}" "${work_dir}/wishlist" \ + | sponge "${work_dir}/wishlist" + git -C "${work_dir}" add 'wishlist' + git -C "${work_dir}" commit 'wishlist' -m 'removed old wish' + fi exit fi @@ -40,4 +46,4 @@ fi | sponge "${work_dir}/wishlist" git -C "${work_dir}" add 'wishlist' -git -C "${work_dir}" commit -m 'new wishes' +git -C "${work_dir}" commit 'wishlist' -m 'new wishes' -- cgit v1.2.3-70-g09d2