#!/usr/bin/env sh # # update-package-md5sum - Updates md5sum of OpenWrt packages # # update-package-md5sum will update the md5sum for all recusivly found OpenWrt packages # in a given directory. # # Usage: scripts/update-package-md5sum # # Example: `scripts/update-package-md5sum feeds/packages/python` DL_FOLDER=`grep -Eo '^CONFIG_DOWNLOAD_FOLDER=".*"$' .config | \ sed 's,^CONFIG_DOWNLOAD_FOLDER="\(.*\)"$,\1,'` if test -z ${DL_FOLDER}; then DL_FOLDER=./dl fi if test -z "$1"; then echo "Usage: $0 " exit fi for file in `find $1 -name Makefile`; do if grep BuildPackage ${file} > /dev/null; then source=`DUMP=1 TOPDIR=\`pwd\` make -f ${file} | grep -m 1 Source | cut -f 2 -d ' '` if test -n "${source}"; then if test ! -f "${DL_FOLDER}/${source}"; then make package/`basename \`dirname ${file}\``/download fi sum=`md5sum ${DL_FOLDER}/${source} 2> /dev/null` || continue echo Updating ${file}... sum=`echo ${sum} | cut -d ' ' -f 1` sed -i "s,^PKG_MD5SUM:=.*,PKG_MD5SUM:=${sum}," ${file} else echo No source for ${file} fi fi done lue='staging-4.1'>staging-4.1 xenJames
aboutsummaryrefslogtreecommitdiffstats
blob: edb3264ce6925c39536b1203ac3beaa7b70ee31d (plain)
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98