summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/curl8
1 files changed, 7 insertions, 1 deletions
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'