Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1426)

Unified Diff: src/scripts/dpkg_no_scripts.sh

Issue 543099: Change the replacement dpkg to respect comment lines in package.whitelist (Closed)
Patch Set: Created 10 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scripts/dpkg_no_scripts.sh
diff --git a/src/scripts/dpkg_no_scripts.sh b/src/scripts/dpkg_no_scripts.sh
index c2cc7c345ee01008a225feed7eb581a9389e1342..63c19429110e972664cbf9c22798e592bbbdb92b 100755
--- a/src/scripts/dpkg_no_scripts.sh
+++ b/src/scripts/dpkg_no_scripts.sh
@@ -53,7 +53,8 @@ is_whitelisted() {
test -f "$whitelist" || return
local checksum=$(md5sum "$1" | awk '{ print $1 }')
- local count=$(grep -c "$checksum" "${whitelist}" || /bin/true)
+ local count=$(sed -e "s/#.*$//" "${whitelist}" | grep -c "$checksum" \
+ || /bin/true)
test $count -ne 0
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698