summaryrefslogtreecommitdiffstats
path: root/ast/ast_dev
blob: a073e9ac61cd9197b48155fd868998cc4f3de6cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86

#  N.B. the previous line should be blank.
#++
#  Name:
#     ast_dev

#  Purpose:
#     Create links to AST include files.

#  Type of Module:
#     Shell script.

#  Description:
#     This command creates (or removes) symbolic links in your current
#     directory which refer to the AST include files. It is provided so
#     that you may develop software which uses these files without having
#     to know where they reside.

#  Invocation:
#     ast_dev [option]

#  Arguments:
#     option
#        If no value is supplied for this argument, symbolic links to AST
#        include files (for both Fortran and C) are created in your current
#        directory. If the value ``remove'' is given, these links are
#        removed. Any other value results in an error.

#  Examples:
#     ast_dev
#        Creates links to the AST include files in your current directory.
#     ast_dev remove
#        Removes any links to the AST include files from your current
#        directory.

#  Copyright:
#     Copyright (C) 1997-2006 Council for the Central Laboratory of the Research Councils

#  Authors:
#     RFWS: R.F. Warren-Smith (STARLINK, RAL)
#     DSB: David S. Berry (STARLINK)
#     {enter_new_authors_here}

#  History:
#     11-NOV-1996 (RFWS):
#        Original version.
#     18-NOV-1997 (RFWS):
#        Adapted prologue for document extraction.
#     13-JUN-2001 (DSB):
#        Added GRF_PAR.
#     {enter_changes_here}

#  Bugs:
#     {note_any_bugs_here}

#--

#  Implementation Notes:
#     The pathname of the installation include directory (e.g. /star/include)
#     must be edited into this script when it is installed. This is normally
#     done by the makefile.

#  Interpret command line.
      case "${1}" in

#  No arguments: create appropriate links.
      '')
         LINK INSTALL_INC/ast.h ast.h
         LINK INSTALL_INC/ast_par AST_PAR
         LINK INSTALL_INC/ast_err AST_ERR
         LINK INSTALL_INC/grf_par GRF_PAR
         ;;

#  Argument is "remove": delete links.
      remove)
         rm -f ast.h AST_PAR AST_ERR GRF_PAR
         ;;

#  Any other argument is invalid: report an error.
      *)
         echo "ast_dev: invalid argument \"${1}\" given" >&2
         exit 1
      ;;
      esac

#  End of script.