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

Unified Diff: src/scripts/enable_localaccount.sh

Issue 660326: Add local account support to make.conf.user (Closed)
Patch Set: Created 10 years, 10 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/enable_localaccount.sh
diff --git a/src/scripts/enable_localaccount.sh b/src/scripts/enable_localaccount.sh
index 802d4ee348ec7540aac63fc148ef9691a0d77bbb..688c8f2664740551bc7efa9a4ef6e2c4b8770d97 100755
--- a/src/scripts/enable_localaccount.sh
+++ b/src/scripts/enable_localaccount.sh
@@ -34,3 +34,11 @@ const char kLocalAccount[] = "$1@gmail.com";
#endif // CHROMEOS_PAM_LOCALACCOUNT_H_
EOF
done
+
+VAR_NAME=CHROMEOS_LOCAL_ACCOUNT
Chris Masone 2010/03/01 23:15:02 Maybe a comment here to explain what's going on?
+if grep -q ${VAR_NAME} /etc/make.conf.user; then
+ regex="s/${VAR_NAME}=.*/${VAR_NAME}=$1@gmail.com/"
+ sudo sed -i -e "${regex}" /etc/make.conf.user
+else
+ sudo sh -c "echo ""${VAR_NAME}=$1@gmail.com"" >> /etc/make.conf.user"
+fi
« 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