54 lines
1.2 KiB
Bash
Executable File
54 lines
1.2 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# usage example:
|
|
# prog 15.01 96535
|
|
|
|
. ~/dev/eiffel/etc/env.rc
|
|
|
|
t_platform=$ISE_PLATFORM
|
|
t_dir=`pwd`
|
|
|
|
t_version=$1
|
|
t_revision=$2
|
|
|
|
t_file=Eiffel_${t_version}_gpl_${t_revision}-${t_platform}.tar.bz2
|
|
t_url=ftp://ftp.eiffel.com/pub/beta/${t_version}/${t_file}
|
|
#t_url=ftp://ftp.eiffel.com/pub/beta/nightly/${t_file}
|
|
|
|
echo Download $t_url
|
|
if [ -f $t_dir/ftp/$t_file ];
|
|
then
|
|
echo "File $t_file already downloaded"
|
|
else
|
|
cd $t_dir/ftp
|
|
wget $t_url
|
|
cd $t_dir
|
|
fi
|
|
|
|
if [ -f $t_dir/ftp/$t_file ];
|
|
then
|
|
t_spec_dir=spec/$t_platform/$t_version.$t_revision
|
|
echo "Extract $t_file into $t_spec_dir"
|
|
mkdir -p $t_dir/$t_spec_dir
|
|
cd $t_dir/$t_spec_dir
|
|
|
|
if [ -d Eiffel_$t_version ];
|
|
then
|
|
echo "$t_version ($t_revision) already installed"
|
|
else
|
|
tar xjvf $t_dir/ftp/$t_file
|
|
fi
|
|
|
|
cd $t_dir
|
|
if [ -d $t_dir/$t_spec_dir/Eiffel_$t_version ];
|
|
then
|
|
echo "Install $t_version ($t_revision) into `pwd`"
|
|
ln -s -f $t_spec_dir/Eiffel_${t_version} $t_version
|
|
else
|
|
echo "Extract failed.."
|
|
fi
|
|
else
|
|
echo "Download failed"
|
|
fi
|
|
|