Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xenv.sh20
-rwxr-xr-xsugar-build-clone.sh23
-rwxr-xr-xsugar-env-setup.sh45
3 files changed, 80 insertions, 8 deletions
diff --git a/env.sh b/env.sh
index ef92e73..ffe8969 100755
--- a/env.sh
+++ b/env.sh
@@ -35,11 +35,12 @@ clean_install () {
echo "[OK]"
}
-configure_apt () {
- echo "Configuring APT"
- cp sources.list install/etc/apt/sources.list
- chroot install apt-get update
- echo "APT Configured"
+copy_files () {
+ echo "Copying files"
+ cp sources.list install/etc/apt/
+ cp sugar-env-setup.sh install/usr/bin/
+ cp sugar-build-clone.sh install/usr/bin/
+ echo "[OK]"
}
# Installation function
@@ -50,7 +51,9 @@ installenv () {
echo "Installing base system"
debootstrap --variant=buildd quantal ./install http://archive.ubuntu.com/ubuntu/
- configure_apt
+ copy_files
+ chroot install sugar-env-setup.sh
+
exit
}
@@ -71,6 +74,7 @@ case $1 in
shell)
chrootshell
;;
+ *)
+ usage
+ ;;
esac
-
-usage
diff --git a/sugar-build-clone.sh b/sugar-build-clone.sh
new file mode 100755
index 0000000..d10c94c
--- /dev/null
+++ b/sugar-build-clone.sh
@@ -0,0 +1,23 @@
+#!/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.
+
+cd
+git clone git://git.sugarlabs.org/sugar-build/sugar-build.git
+cd sugar-build
+make build
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