Commit 33352ee5 authored by Ed Reel's avatar Ed Reel Committed by Chris Thurber

Generate a pipe delimited list of GitHub projects that need updates (#3598)

parent f79a2df3
......@@ -7,11 +7,13 @@ if [ ! -f packages.yaml ]; then
exit 1
fi
if test $1; then
grep -1 "^activity: $1" packages.yaml > /tmp/activity.txt
grep ^url: /tmp/activity.txt | cut -d' ' -f2 | sort | uniq > /tmp/urls.txt
grep -2 "^activity: $1" packages.yaml > /tmp/activity.txt
grep ^name: /tmp/activity.txt | cut -d' ' -f2 > /tmp/names.txt
grep ^url: /tmp/activity.txt | cut -d' ' -f2 > /tmp/urls.txt
rm -f /tmp/activity.txt
else
grep ^url: packages.yaml | cut -d' ' -f2 | sort | uniq > /tmp/urls.txt
grep ^name: packages.yaml | cut -d' ' -f2 > /tmp/names.txt
grep ^url: packages.yaml | cut -d' ' -f2 > /tmp/urls.txt
fi
if test $2; then
lines=$(wc -l /tmp/urls.txt | cut -d' ' -f1)
......@@ -19,12 +21,29 @@ if test $2; then
urls=$(($lines - $offset))
if test $3; then
count=$3
tail -$urls /tmp/names.txt | head -$count > /tmp/new_names.txt
tail -$urls /tmp/urls.txt | head -$count > /tmp/new_urls.txt
else
tail -$urls /tmp/names.txt > /tmp/new_names.txt
tail -$urls /tmp/urls.txt > /tmp/new_urls.txt
fi
mv /tmp/new_names.txt /tmp/names.txt
mv /tmp/new_urls.txt /tmp/urls.txt
fi
#for u in $(cat /tmp/urls.txt); do elinks $u; done
#rm -f /tmp/urls.txt
most /tmp/urls.txt
c=1
for u in $(cat /tmp/urls.txt); do
if [[ $u == *"github.com"* && $u == *"/releases"* ]]; then
name=$(head -$c /tmp/names.txt | tail -1)
version=$(grep "^ version" ../packages/$name.rb | cut -d"'" -f2)
content=$(curl -Ls $u)
d=${content#*/archive/}
rel=$(echo $d | cut -d '"' -f1)
ver=${rel%.zip*}
nu=$(echo "${u/releases/archive}")
echo "$name | $nu/$ver.tar.gz | $version | $ver"
fi
c=$((c+1))
done
#most /tmp/urls.txt
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment