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

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

Issue 432002: build: Make make_chroot and make_local_repo fail when run as root. (Closed)
Patch Set: Created 11 years, 1 month 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 | « src/scripts/make_chroot.sh ('k') | 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) 2009 The Chromium OS Authors. All rights reserved. 3 # Copyright (c) 2009 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 # Load common constants. This should be the first executable line. 7 # Load common constants. This should be the first executable line.
8 # The path to common.sh should be relative to your script's location. 8 # The path to common.sh should be relative to your script's location.
9 . "$(dirname "$0")/common.sh" 9 . "$(dirname "$0")/common.sh"
10 10
11 # Script must be run outside the chroot 11 # Script must be run outside the chroot and as a regular user.
12 assert_outside_chroot 12 assert_outside_chroot
13 assert_not_root_user
13 14
14 DEFAULT_DEST="$GCLIENT_ROOT/repo" 15 DEFAULT_DEST="$GCLIENT_ROOT/repo"
15 DEFAULT_DEV_PKGLIST="$SRC_ROOT/package_repo/repo_list_dev.txt" 16 DEFAULT_DEV_PKGLIST="$SRC_ROOT/package_repo/repo_list_dev.txt"
16 DEFAULT_IMG_PKGLIST="$SRC_ROOT/package_repo/repo_list_image.txt" 17 DEFAULT_IMG_PKGLIST="$SRC_ROOT/package_repo/repo_list_image.txt"
17 18
18 # Command line options 19 # Command line options
19 DEFINE_string suite "$DEFAULT_EXT_SUITE" "Ubuntu suite to pull packages from." 20 DEFINE_string suite "$DEFAULT_EXT_SUITE" "Ubuntu suite to pull packages from."
20 DEFINE_string mirror "$DEFAULT_EXT_MIRROR" "Ubuntu repository mirror to use." 21 DEFINE_string mirror "$DEFAULT_EXT_MIRROR" "Ubuntu repository mirror to use."
21 DEFINE_string dest "$DEFAULT_DEST" "Destination directory for repository." 22 DEFINE_string dest "$DEFAULT_DEST" "Destination directory for repository."
22 DEFINE_string devlist "$DEFAULT_DEV_PKGLIST" \ 23 DEFINE_string devlist "$DEFAULT_DEV_PKGLIST" \
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 217
217 if [ $FLAGS_upimg -eq $FLAGS_TRUE ] 218 if [ $FLAGS_upimg -eq $FLAGS_TRUE ]
218 then 219 then
219 update_suite $FLAGS_imgsuite $FLAGS_imglist 220 update_suite $FLAGS_imgsuite $FLAGS_imglist
220 fi 221 fi
221 222
222 # Clean up the chroot mounts 223 # Clean up the chroot mounts
223 cleanup_chroot_mounts 224 cleanup_chroot_mounts
224 225
225 echo "Done." 226 echo "Done."
OLDNEW
« no previous file with comments | « src/scripts/make_chroot.sh ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698