head	1.1;
branch	1.1.1;
access;
symbols
	import-20090318:1.1.1.3
	import-20081205:1.1.1.3
	rel-8-1-2-sv:1.1.1.3
	import-20080404:1.1.1.3
	import-20071105:1.1.1.3
	import-20070116:1.1.1.2
	import-20061124:1.1.1.2
	rel-6-2-2-sv:1.1.1.1
	rel-6-2-1-sv:1.1.1.1
	import-20060615:1.1.1.1
	freescale:1.1.1;
locks; strict;
comment	@# @;


1.1
date	2006.06.15.09.35.19;	author seh;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2006.06.15.09.35.19;	author seh;	state Exp;
branches;
next	1.1.1.2;

1.1.1.2
date	2006.11.27.11.19.19;	author seh;	state Exp;
branches;
next	1.1.1.3;

1.1.1.3
date	2007.11.06.15.44.45;	author seh;	state Exp;
branches;
next	;
commitid	AdKoH3Xx8FxdUwEs;


desc
@@


1.1
log
@Initial revision
@
text
@eval 'LANG=C exec perl -w -S $0 ${1+"$@@"}'
    if $running_under_some_shell;
$running_under_some_shell = 0;

######################################################################
#
# Copyright  Freescale Semiconductor, Inc. 2004-2005. All rights reserved.
#
# Stuart Hughes, stuarth@@freescale.com, 14th June 2005
#   
# This file is part of LTIB.
#
# LTIB 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 2 of the License, or
# (at your option) any later version.
# 
# LTIB 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 LTIB; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
#
#
######################################################################
use FindBin;
use Cwd;
$isodir = $FindBin::Bin;
$echo   = '';

die <<TXT if $> == 0;

You should not be root when installing LTIB

TXT

umask(0);

print <<TXT;

You are about to install the LTIB (GNU/Linux Target Image Builder)

Do you want to continue ? Y|n
TXT
$_ = <STDIN>;
die "Installation aborted, goodbye\n" if /^n/i;

$tag  = "ltib";
$tdir = cwd();

while(1){
    print "Where do you want to install LTIB ? ($tdir/$tag)\n";
    chomp($line  = <STDIN>);
    ($tdir,$tag) = $line =~ m,(/[^\s]+)/([^/\s]+), if $line;
    warn("You need to supply an absolute path\n\n"), next unless $tdir && $tag;
    warn("Directory $tdir/$tag already exists\n\n"), next if -d "$tdir/$tag";
    if(! -d $tdir) {
        print "Making target directory $tdir\n";
        system("$echo mkdir -p $tdir/$tag") == 0 or next;
    }
    chdir $tdir or die "chdir $tdir";
    last;
}

print "Installing LTIB to $tdir/$tag\n";
system("set -x; $echo cvs -z3 -d:pserver:anonymous\@@cvs.savannah.nongnu.org:/sources/ltib co -d $tag ltib") == 0 or die;

print <<TXT;

LTIB download complete, your ltib installation has been placed in 
$tdir/$tag, to complete the installation, run the following commands:

\$ cd $tdir/$tag
\$ ./ltib

TXT
exit 0;

@


1.1.1.1
log
@Import from fsl 20060615
@
text
@@


1.1.1.2
log
@Import from fsl 20061124
@
text
@d69 1
a69 1
system("set -x; $echo cvs -z3 -d:pserver:anonymous\@@cvs.savannah.nongnu.org:/sources/ltib co -d $tag -P ltib") == 0 or die;
@


1.1.1.3
log
@Import from fsl 20071105
@
text
@a0 1
#!/usr/bin/perl -w
d7 1
a7 1
# Copyright  Freescale Semiconductor, Inc. 2004-2007. All rights reserved.
@


