summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2022-09-13 22:52:20 +0200
committerErich Eckner <git@eckner.net>2022-09-13 22:52:20 +0200
commitb8216f6dd92c288beaee2252e81efabfc3fd983e (patch)
tree9cbedcaf6407b8c5c29b8ee97658ad8f3adcfebb /bin
parent037dda12bc82dad91fc6b76f0a811028b026c33e (diff)
downloadairgapd-b8216f6dd92c288beaee2252e81efabfc3fd983e.tar.xz
bin/curl: remove old wishes
Diffstat (limited to 'bin')
-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'