diff options
-rw-r--r-- | Makefile | 2 | ||||
-rwxr-xr-x | env.sh | 17 | ||||
-rwxr-xr-x | sugar-build-command | 21 |
3 files changed, 40 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..71b4135 --- /dev/null +++ b/Makefile @@ -0,0 +1,2 @@ +%: + ./sugar-chroot install sugar-build-command $* @@ -46,10 +46,23 @@ copy_files () { cp sources.list install/etc/apt/ cp sugar-env-setup.sh install/usr/bin/ cp sugar-build-clone.sh install/usr/bin/ + cp sugar-build-command install/usr/bin/ cp install/etc/bash.bashrc install/root/.bashrc echo "##### OK #####" } +create_symlinks () { + echo "#######################" + echo "Creating symbolic links" + echo "#######################" + + ln -s install/home/sugar/sugar-build/source ./source + mkdir install/home/sugar/sugar-build/activities + ln -s install/home/sugar/sugar-build/activities ./activities + + echo "##### OK #####" +} + # Installation function installenv () { check_root @@ -62,6 +75,7 @@ installenv () { copy_files ./sugar-chroot install sugar-env-setup.sh + create_symlinks } chrootshell () { @@ -85,6 +99,9 @@ case $1 in shell) chrootshell ;; + symlinks) + create_symlinks + ;; *) usage ;; diff --git a/sugar-build-command b/sugar-build-command new file mode 100755 index 0000000..e488220 --- /dev/null +++ b/sugar-build-command @@ -0,0 +1,21 @@ +#!/bin/bash +# +# 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 /home/sugar/sugar-build +su sugar -c "make $@" |