Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xenv.sh12
-rwxr-xr-xsugar-env-setup.sh16
2 files changed, 22 insertions, 6 deletions
diff --git a/env.sh b/env.sh
index 7b5a487..617ef71 100755
--- a/env.sh
+++ b/env.sh
@@ -18,16 +18,20 @@
# MA 02110-1301, USA.
check_root () {
+ echo "#############################"
echo "Checking for root permissions"
+ echo "#############################"
if [ `whoami` != root ]; then
echo $0 ": Need to run as root. Stopping."
exit
fi
- echo "[OK]"
+ echo "##### OK #####"
}
clean_install () {
+ echo "##########################"
echo "Cleaning install directory"
+ echo "##########################"
if [ -d ./install ]; then
rm -Rf ./install
fi
@@ -36,12 +40,14 @@ clean_install () {
}
copy_files () {
+ echo "#############"
echo "Copying files"
+ echo "#############"
cp sources.list install/etc/apt/
cp sugar-env-setup.sh install/usr/bin/
cp sugar-build-clone.sh install/usr/bin/
cp install/etc/bash.bashrc install/root/.bashrc
- echo "[OK]"
+ echo "##### OK #####"
}
# Installation function
@@ -49,7 +55,9 @@ installenv () {
check_root
clean_install
+ echo "######################"
echo "Installing base system"
+ echo "######################"
debootstrap --variant=buildd quantal ./install http://archive.ubuntu.com/ubuntu/
copy_files
diff --git a/sugar-env-setup.sh b/sugar-env-setup.sh
index f08170b..e91abed 100755
--- a/sugar-env-setup.sh
+++ b/sugar-env-setup.sh
@@ -18,27 +18,35 @@
# MA 02110-1301, USA.
configure_apt () {
+ echo "###############"
echo "Configuring APT"
+ echo "###############"
apt-get update
- echo "[OK]"
+ echo "##### OK #####"
}
install_packages () {
+ echo "###############################################"
echo "Installing packages required to run Sugar-build"
+ echo "###############################################"
apt-get -y install ssh git python sudo time locales dialog python-apt
- echo "[OK]"
+ echo "##### OK #####"
+ echo "##################"
echo "Generating locales"
+ echo "##################"
locale-gen $LANG
- echo "[OK]"
+ echo "##### OK #####"
}
create_user () {
+ echo "#################"
echo "Creating new user"
+ echo "#################"
mkdir /home/sugar
useradd -g sudo -d /home/sugar -s /bin/bash sugar
chown sugar /home/sugar
passwd sugar
- echo "[OK]"
+ echo "##### OK #####"
}
configure_apt