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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [lib/] [libbsp/] [bare/] [build-tools] - Blame information for rev 389

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
#
2
# $Id: build-tools,v 1.2 2001-09-27 11:59:44 chris Exp $
3
#
4
# Tools to help doing build scripts. Adapted from Joel's bit
5
# script.
6
#
7
 
8
#
9
# USERCHANGE - uncomment this if you want to watch the commands.
10
#
11
# set -x
12
 
13
start=`date`
14
 
15
#
16
# Common exit routine for this script so we can print the starting
17
# and ending times.
18
#
19
 
20
my_exit()
21
{
22
  stop=`date`
23
 
24
  echo
25
  echo "Started:  " $start
26
  echo "Finished: " $stop
27
  exit $1
28
}
29
 
30
#
31
# Handle a fatal error.
32
#
33
 
34
fatal_error()
35
{
36
  echo "ERROR: $*" >&2
37
  my_exit 1
38
}
39
 
40
#
41
# Checks the status returned by executables and exits if it is non-zero.
42
#
43
 
44
check_fatal()
45
{
46
  if [ $1 -ne 0 ] ; then
47
    shift
48
    fatal_error $*
49
  fi
50
}
51
 
52
#
53
# Test for a valid path, exit if not found
54
#
55
 
56
test_path()
57
{
58
  test -d $* || fatal_error "cannot find $*"
59
  return 0
60
}
61
 
62
#
63
# Create a directory and check it was made correctly.
64
#
65
 
66
checked_mkdir()
67
{
68
  mkdir -p $1
69
  check_fatal $? "unable to make directory $1"
70
  return 0
71
}

powered by: WebSVN 2.1.0

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