forked from WalletScrutiny/WalletScrutinyCom
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrefreshResults.sh
More file actions
executable file
·64 lines (55 loc) · 2.75 KB
/
refreshResults.sh
File metadata and controls
executable file
·64 lines (55 loc) · 2.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
echo "Reproducible wallets with version changes (need analysis):"
for f in $( git diff -G'version' --name-only ); do
if grep -q "^verdict: reproducible" $f; then
echo $f changed to $( grep '^version' $f )
fi
done
# Run migrate script just in case. It also makes some basic checks
node scripts/migrate.js
echo "Diff minus the boring stuff:"
git diff --word-diff=color | grep -v "latest\|ratings\|reviews\|---\|@\|index\|^diff\|Binary\|apkVersionName\|size\|updated\|^score:\|^rating\|^version\|^review\|^stars\|^users" | grep "+++\|"
echo "Duplicate wsIds android:"
diff <( rgrep '^wsId: ' _android/ | sed 's/.*wsId: //g' | sed -e '/^$/d' | sort ) <( rgrep '^wsId: ' _android/ | sed 's/.*wsId: //g' | sed -e '/^$/d' | sort -u )
echo "Duplicate wsIds iphone:"
diff <( rgrep '^wsId: ' _iphone/ | sed 's/.*wsId: //g' | sed -e '/^$/d' | sort ) <( rgrep '^wsId: ' _iphone/ | sed 's/.*wsId: //g' | sed -e '/^$/d' | sort -u )
echo "wsId only present in Android or only in iPhone:"
diff <( rgrep '^wsId: ' _android/ | sed 's/.*wsId: //g' | sed -e '/^$/d' | sort -u ) <( rgrep '^wsId: ' _iphone/ | sed 's/.*wsId: //g' | sed -e '/^$/d' | sort -u ) | grep "<\|>" | sed 's/</Android:/' | sed 's/>/iPhone:/' | sort
function moreSince {
echo $( git diff @{$1} | grep '^-users: ' | wc -l )
}
echo "HWWs that are unreleased/defunct"
grep -l "meta: defunct" `grep -l "verdict: unreleased" _hardware/*`
echo "Apps that now have more users ..."
echo "... than yesterday: $( moreSince 'one.days.ago' )"
echo "... than last week: $( moreSince 'one.weeks.ago' )"
echo "... than last month: $( moreSince 'one.months.ago' )"
# poking around to verify that script runs actually do update all relevant apps.
# as of today it all looks correct, with only fewusers apps not changing
# in five weeks, while the last structural change affecting all android/iphone
# was during the week prior.
function unchangedSince {
echo "Unchanged since $1: " $( ( grep -l "meta: ok" `git diff --name-only @{$1} _android/ _iphone/ | grep ".md"` ; grep -l "meta: ok" `find _android/ _iphone/ | grep ".md"` ) | sort | uniq -u | wc -l )
}
unchangedSince 'one.days.ago'
unchangedSince 'four.days.ago'
unchangedSince 'two.weeks.ago'
unchangedSince 'four.weeks.ago'
unchangedSince 'five.weeks.ago'
unchangedSince 'six.weeks.ago'
# List missing icons
for platform in hardware bearer android iphone; do
export platform=$platform
diff \
<(grep -l 'icon: .' _$platform/* \
| awk -F '/' '{print $2}' \
| sed 's/.md$//g' \
| sort ) \
<(ls -1 images/wIcons/$platform/tiny/ \
| sed 's/.png$//g' \
| sed 's/.jpg$//g' \
| sort ) \
| grep '<' \
| awk '{print $2}' \
| xargs -n 1 bash -c 'echo -e "No icon found for $platform $0\n$( git log --summary | grep $0 )"' \
| grep -v bash
done