OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rtems-20020807/] [scripts/] [setup] - Rev 1765

Compare with Previous | Blame | View Log

#!/bin/bash

CFG=setup.cache

# RTEMS tools setup

if test ! -f ./$CFG;
then
 echo -n "restoring default setup.cache .." 
 cp ./setup.def ./$CFG
 echo " done"
fi

echo -n "loading setup from ./$CFG .."
. ./$CFG
echo " done"
echo

menu_setup()
{
while true;
do
  echo
  echo "       Source packages setup"
  echo
  echo "0 binutils version        : $binutils_version"
  echo "1 binutils patch version  : $binutils_patch_version"
  echo "2 binutils rpm release    : $binutils_rpm_release"
  echo "3 gcc version             : $gcc_version"
  echo "4 gcc patch version       : $gcc_patch_version"
  echo "5 newlib version          : $newlib_version"
  echo "6 newlib patch version    : $newlib_patch_version"
  echo "7 gcc/newlib rpm release  : $gccnewlib_rpm_release"
  echo "8 gdb version             : $gdb_version"
  echo "9 gdb patch version       : $gdb_patch_version"
  echo "a gdb rpm release         : $gdb_rpm_release"
  echo "b rtems version           : $rtems_version"
  echo "c rtems rpm release       : $rtems_rpm_release"
  echo "d rpm build root          : $rpm_build_root"
  echo "e gcc3 version             : $gcc3_version"
  echo "f gcc3 patch version       : $gcc3_patch_version"
  echo "g gcc3 newlib version      : $gcc3newlib_version"
  echo "h gcc3 newlib patch version: $gcc3newlib_patch_version"
  echo "i gcc3/newlib rpm release  : $gcc3newlib_rpm_release"
  echo

  echo -n "[0-9a-d] or any other key to quit >"
  read sel
  case $sel in
  0) echo -n "BINUTILS source >"
     read binutils_version ;;
  1) echo -n "BINUTILS patch version >"
     read binutils_patch_version ;;
  2) echo -n "BINUTILS RPM release >"
     read binutils_rpm_release ;;
  3) echo -n "GCC source >"
     read gcc_version ;;
  4) echo -n "GCC patch version>"
     read gcc_patch_version ;;
  5) echo -n "NEWLIB source >"
     read newlib_version ;;
  6) echo -n "NEWLIB patch version>"
     read newlib_patch_version ;;
  7) echo -n "GCC/NEWLIB RPM release >"
     read gccnewlib_rpm_release ;;
  8) echo -n "GDB source >"
     read gdb_version ;;
  9) echo -n "GDB patch version>"
     read gdb_patch_version ;;
  a) echo -n "GDB RPM release >"
     read gdb_rpm_release ;;
  b) echo -n "RTEMS source >"
     read rtems_version ;;
  c) echo -n "RTEMS RPM release >"
     read rtems_rpm_release ;;
  d) echo -n "RPM build root >"
     read rpm_build_root ;;
  e) echo -n "GCC3 source >"
     read gcc3_version ;;
  f) echo -n "GCC3 patch version>"
     read gcc3_patch_version ;;
  g) echo -n "NEWLIB source >"
     read gcc3newlib_version ;;
  h) echo -n "NEWLIB patch version>"
     read gcc3newlib_patch_version ;;
  i) echo -n "GCC3/NEWLIB RPM release >"
     read gcc3newlib_rpm_release ;;
  *) 
     return 0 ;;
  esac
done
}


save_setup()
{
echo -n "saving setup to $CFG .."

echo "# RTEMS tools setup" > $CFG
echo "binutils_version=$binutils_version" >> $CFG
echo "binutils_patch_version=$binutils_patch_version" >> $CFG
echo "binutils_rpm_release=$binutils_rpm_release" >> $CFG
echo "newlib_version=$newlib_version" >> $CFG
echo "newlib_patch_version=$newlib_patch_version" >> $CFG
echo "gcc_version=$gcc_version" >> $CFG
echo "gcc_patch_version=$gcc_patch_version" >> $CFG
echo "gccnewlib_rpm_release=$gccnewlib_rpm_release" >> $CFG
echo "gdb_version=$gdb_version" >> $CFG
echo "gdb_patch_version=$gdb_patch_version" >> $CFG
echo "gdb_rpm_release=$gdb_rpm_release" >> $CFG
echo "rtems_version=$rtems_version" >> $CFG
echo "rtems_rpm_release=$rtems_rpm_release" >> $CFG
echo "rpm_build_root=$rpm_build_root" >> $CFG
echo "gcc3newlib_version=$gcc3newlib_version" >> $CFG
echo "gcc3newlib_patch_version=$gcc3newlib_patch_version" >> $CFG
echo "gcc3_version=$gcc3_version" >> $CFG
echo "gcc3_patch_version=$gcc3_patch_version" >> $CFG
echo "gcc3newlib_rpm_release=$gcc3newlib_rpm_release" >> $CFG

echo " done"
test -f Makefile || ./configure
}

menu_setup

echo
echo -n "Save setup [y|n] >"
read sel
case $sel in
''|y*|Y*) save_setup ;;
*) ;;
esac

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.