mirror of
https://github.com/agarrharr/awesome-cli-apps
synced 2025-07-04 04:18:23 +02:00
Add script for checking for deprecation
This commit is contained in:
parent
32c0e0fa6b
commit
e89ab36455
1 changed files with 21 additions and 0 deletions
21
check-for-deprecation.sh
Executable file
21
check-for-deprecation.sh
Executable file
|
@ -0,0 +1,21 @@
|
||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
OUT_FILE=deprecated.txt
|
||||||
|
|
||||||
|
if [ "$1" = "--help" ] || [ "$1" = "-h" ] || [ "$1" = "help" ]; then
|
||||||
|
cat <<EOF
|
||||||
|
$ check-for-deprecation.sh
|
||||||
|
Check all github apps in the readme for deprecation.
|
||||||
|
|
||||||
|
Found deprecated repos are written to: $OUT_FILE
|
||||||
|
|
||||||
|
Parallel execution (100% cpu).
|
||||||
|
EOF
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
APPS=$(cat readme.md | grep -e "- \[.\+\]\(.\+\)\s" | grep 'github.com' | awk -F "(" '{ print $2 }' | cut -d ")" -f1)
|
||||||
|
|
||||||
|
for i in $(echo $APPS); do
|
||||||
|
echo $(if [[ -n $(curl -SsL "$i" | grep "This repository has been archived by the owner. It is now read-only.") ]]; then echo DEPRECATED $i | tee >>deprecated.txt >(cat /dev/stdin); else echo CHECKED $i | cat /dev/stdin; fi) &
|
||||||
|
done
|
Loading…
Add table
Add a link
Reference in a new issue