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

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

Issue 660326: Add local account support to make.conf.user (Closed)
Patch Set: Created 10 years, 9 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 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 2 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 set -e 5 set -e
6 6
7 if [ -z $1 ] 7 if [ -z $1 ]
8 then 8 then
9 echo "Usage: $0 localaccount_username" 9 echo "Usage: $0 localaccount_username"
10 exit 1 10 exit 1
(...skipping 16 matching lines...) Expand all
27 #ifndef CHROMEOS_PAM_LOCALACCOUNT_H_ 27 #ifndef CHROMEOS_PAM_LOCALACCOUNT_H_
28 #define CHROMEOS_PAM_LOCALACCOUNT_H_ 28 #define CHROMEOS_PAM_LOCALACCOUNT_H_
29 29
30 namespace $namespace { 30 namespace $namespace {
31 const char kLocalAccount[] = "$1@gmail.com"; 31 const char kLocalAccount[] = "$1@gmail.com";
32 } 32 }
33 33
34 #endif // CHROMEOS_PAM_LOCALACCOUNT_H_ 34 #endif // CHROMEOS_PAM_LOCALACCOUNT_H_
35 EOF 35 EOF
36 done 36 done
37
38 VAR_NAME=CHROMEOS_LOCAL_ACCOUNT
Chris Masone 2010/03/01 23:15:02 Maybe a comment here to explain what's going on?
39 if grep -q ${VAR_NAME} /etc/make.conf.user; then
40 regex="s/${VAR_NAME}=.*/${VAR_NAME}=$1@gmail.com/"
41 sudo sed -i -e "${regex}" /etc/make.conf.user
42 else
43 sudo sh -c "echo ""${VAR_NAME}=$1@gmail.com"" >> /etc/make.conf.user"
44 fi
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