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

Side by Side Diff: src/scripts/package_script_whitelist.sh

Issue 543146: Update maintainer script template (Closed)
Patch Set: Address comments 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 2
3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 # This script is used to maintain the whitelist for package maintainer scripts. 7 # This script is used to maintain the whitelist for package maintainer scripts.
8 # If a package maintainer script is in the whitelist file then it is ok to skip 8 # If a package maintainer script is in the whitelist file then it is ok to skip
9 # running that maintainer script when installing the package. Otherwise there 9 # running that maintainer script when installing the package. Otherwise there
10 # should be an equivalent script that can perform those operation on a target 10 # should be an equivalent script that can perform those operation on a target
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 return 84 return
85 fi 85 fi
86 86
87 cat <<EOF > "$path" 87 cat <<EOF > "$path"
88 #!/bin/bash 88 #!/bin/bash
89 89
90 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 90 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
91 # Use of this source code is governed by a BSD-style license that can be 91 # Use of this source code is governed by a BSD-style license that can be
92 # found in the LICENSE file. 92 # found in the LICENSE file.
93 93
94 # $file
95
96 set -e
97
94 # \$ROOT - The path to the target root file system. 98 # \$ROOT - The path to the target root file system.
95 # \$SRC_ROOT - The path to the source tree. 99 # \$SRC_ROOT - The path to the source tree.
96 100
97 # $file
98
99 # TODO: The equivalent of $file running from outside of the target rootfs 101 # TODO: The equivalent of $file running from outside of the target rootfs
100 # that only uses tools from the build machine and not from the target. 102 # that only uses tools from the build machine and not from the target.
103
104 exit 1
105
101 EOF 106 EOF
102 chmod 0750 "$path" 107 chmod 0750 "$path"
103 } 108 }
104 109
105 # Show the script to the user for audit purposes. 110 # Show the script to the user for audit purposes.
106 # 111 #
107 # $1 - The script to show. 112 # $1 - The script to show.
108 show_script() { 113 show_script() {
109 local path=$1 114 local path=$1
110 local type=$(file -b "$path") 115 local type=$(file -b "$path")
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 if is_whitelisted "$FLAGS_file"; then 206 if is_whitelisted "$FLAGS_file"; then
202 echo "Whitelisted" 207 echo "Whitelisted"
203 else 208 else
204 echo "Not whitelisted" 209 echo "Not whitelisted"
205 fi 210 fi
206 ;; 211 ;;
207 *) 212 *)
208 echo "Unknown command." 213 echo "Unknown command."
209 ;; 214 ;;
210 esac 215 esac
OLDNEW
« 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