diff options
author | Daniel Francis <francis@sugarlabs.org> | 2013-01-24 16:19:32 (GMT) |
---|---|---|
committer | Daniel Francis <francis@sugarlabs.org> | 2013-01-24 16:19:32 (GMT) |
commit | 67c35e18f44df999cce5eab62b1849d33e593879 (patch) | |
tree | f5b8f54b0fb568ad1a683b6ceb0cc4d26f3f807e /sugar-env-setup.sh | |
parent | 607657f16231f8a22a51568fec4ba1a226c9c8d2 (diff) |
Setup system, clone and build Sugar-build
Signed-off-by: Daniel Francis <francis@sugarlabs.org>
Diffstat (limited to 'sugar-env-setup.sh')
-rwxr-xr-x | sugar-env-setup.sh | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/sugar-env-setup.sh b/sugar-env-setup.sh new file mode 100755 index 0000000..ec028cb --- /dev/null +++ b/sugar-env-setup.sh @@ -0,0 +1,45 @@ +#!/bin/sh +# +# Copyright (C) 2013 Daniel Francis <francis@sugarlabs.org> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301, USA. + +configure_apt () { + echo "Configuring APT" + apt-get update >> /dev/null + echo "[OK]" +} + +install_packages () { + echo "Installing packages required to run Sugar-build" + apt-get -y install ssh git python sudo time locales dialog python-apt + echo "[OK]" +} + +create_user () { + echo "Creating new user" + mkdir /home/sugar + useradd -g sudo -d /home/sugar -s /bin/bash sugar + chown sugar /home/sugar + passwd -d sugar >> /dev/null + echo "[OK]" +} + +configure_apt +install_packages +create_user + +su sugar sugar-build-clone.sh |