From 8be7aa457cc8907acccb75bf5efcdc26c5b952ee Mon Sep 17 00:00:00 2001
From: Martin Fischer <martin@push-f.com>
Date: Fri, 10 Dec 2021 10:15:48 +0100
Subject: aggregate lib_feats.txt

---
 .gitignore         | 1 +
 deploy.sh          | 4 +---
 fetch_and_build.sh | 5 +++++
 find.sh            | 2 ++
 4 files changed, 9 insertions(+), 3 deletions(-)
 create mode 100755 fetch_and_build.sh
 create mode 100755 find.sh

diff --git a/.gitignore b/.gitignore
index 02987d4..6e07cec 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
 caniuse.rs/
 target/
+lib_feats.txt
diff --git a/deploy.sh b/deploy.sh
index e811b40..0b57bc4 100755
--- a/deploy.sh
+++ b/deploy.sh
@@ -1,4 +1,2 @@
-(cd caniuse.rs; git checkout main; git pull)
-rm -r build/
-./build.py
+./fetch_and_build.sh
 tar cf - -C target . | ssh push-f.com 'sh -c "set -x; cd /var/www/rust-features.push-f.com && pwd && tar xvf - && echo done"'
diff --git a/fetch_and_build.sh b/fetch_and_build.sh
new file mode 100755
index 0000000..5c9eaa0
--- /dev/null
+++ b/fetch_and_build.sh
@@ -0,0 +1,5 @@
+(cd caniuse.rs; git checkout main; git pull --ff-only)
+(cd ~/repos-contrib/rust; git checkout master; git pull --ff-only)
+./find.sh | grep -oP '(?<=feature = ")([^"]+)' > lib_feats.txt
+rm -r build/
+./build.py
diff --git a/find.sh b/find.sh
new file mode 100755
index 0000000..17a7e11
--- /dev/null
+++ b/find.sh
@@ -0,0 +1,2 @@
+cd ~/repos-contrib/rust
+git grep -hEo '(un)?stable\(feature =.+\)' library/ | grep -v 'issue = "none"' | sort  | uniq
-- 
cgit v1.2.3