2011-10-26 17:16:46 -04:00
#!/bin/sh
# -*- indent-tabs-mode: nil; -*-
# Install built ostree image to current system
#
# Copyright (C) 2011 Colin Walters <walters@verbum.org>
#
2011-11-10 13:17:04 -05:00
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
2011-10-26 17:16:46 -04:00
#
2011-11-10 13:17:04 -05:00
# This library is distributed in the hope that it will be useful,
2011-10-26 17:16:46 -04:00
# but WITHOUT ANY WARRANTY; without even the implied warranty of
2011-11-10 13:17:04 -05:00
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
2011-10-26 17:16:46 -04:00
#
2011-11-10 13:17:04 -05:00
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
2011-10-26 17:16:46 -04:00
set -e
set -x
SRCDIR = ` dirname $0 `
WORKDIR = ` pwd `
OBJ = gnomeos-initrd.img
if ! test -f ${ OBJ } ; then
echo " Error: couldn't find ' $OBJ '. Run gnomeos-make-image.sh "
exit 1
fi
if test -d /ostree; then
echo "/ostree already exists"
exit 1
fi
2011-10-26 18:42:55 -04:00
cp -a gnomeos-fs/ostree /
2011-10-26 17:16:46 -04:00
initrd = ` readlink gnomeos-initrd.img`
cp ${ initrd } /boot
grubby --title "GNOME OS" --add-kernel= $kernel --copy-default --initrd= /boot/${ initrd }