Commit a06120b6 authored by Chris Thurber's avatar Chris Thurber Committed by GitHub

Merge pull request #2462 from uberhacker/update-packages_yaml

Update packages.yaml in tools
parents 511ee9cb c7e64f39
...@@ -6,18 +6,25 @@ if [ ! -f packages.yaml ]; then ...@@ -6,18 +6,25 @@ if [ ! -f packages.yaml ]; then
echo "packages.yaml not found." echo "packages.yaml not found."
exit 1 exit 1
fi fi
grep ^url: packages.yaml | cut -d' ' -f2 > /tmp/urls.txt
if test $1; then if test $1; then
grep -1 "^activity: $1" packages.yaml > /tmp/activity.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 > /tmp/urls.txt
fi
if test $2; then
lines=$(wc -l /tmp/urls.txt | cut -d' ' -f1) lines=$(wc -l /tmp/urls.txt | cut -d' ' -f1)
offset=$1 offset=$2
urls=$(($lines - $offset)) urls=$(($lines - $offset))
if test $2; then if test $3; then
count=$2 count=$3
tail -$urls /tmp/urls.txt | head -$count > /tmp/new_urls.txt tail -$urls /tmp/urls.txt | head -$count > /tmp/new_urls.txt
else else
tail -$urls /tmp/urls.txt > /tmp/new_urls.txt tail -$urls /tmp/urls.txt > /tmp/new_urls.txt
fi fi
mv /tmp/new_urls.txt /tmp/urls.txt mv /tmp/new_urls.txt /tmp/urls.txt
fi fi
for u in $(cat /tmp/urls.txt); do elinks $u; done #for u in $(cat /tmp/urls.txt); do elinks $u; done
rm -f /tmp/urls.txt #rm -f /tmp/urls.txt
most /tmp/urls.txt
This diff is collapsed.
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