| Last change
 on this file since 6 was             6, checked in by barrand, 19 years ago | 
        
          |  | 
        
          | 
              
Property                 svn:executable
 set to                 * | 
        
          | File size:
            1.0 KB | 
      
      
| Line |  | 
|---|
| 1 | #!/bin/sh -f | 
|---|
| 2 |  | 
|---|
| 3 | #//////////////////////////////////////////////// | 
|---|
| 4 | # Usage : | 
|---|
| 5 | #   UNIX> cd some_path/pack/version/obuild | 
|---|
| 6 | # ( UNIX> chmod a+x sh/install ) | 
|---|
| 7 | #   UNIX> sh/install | 
|---|
| 8 | # | 
|---|
| 9 | # This script is intended to install the | 
|---|
| 10 | # setup.sh and setup.csh scripts. | 
|---|
| 11 | # | 
|---|
| 12 | # For setup.sh, it edits the path line : | 
|---|
| 13 | #   path_<package>=@@absolute_dir@@ | 
|---|
| 14 | # and for setup.csh, the path line : | 
|---|
| 15 | #   set path_BatchLab="@@absolute_dir@@" | 
|---|
| 16 | # | 
|---|
| 17 | # The script replaces in these lins the string : | 
|---|
| 18 | #   @@absolute_dir@@ | 
|---|
| 19 | # by the return of the pwd command. | 
|---|
| 20 | # | 
|---|
| 21 | #//////////////////////////////////////////////// | 
|---|
| 22 |  | 
|---|
| 23 | obuild_current=`pwd` | 
|---|
| 24 |  | 
|---|
| 25 | obuild_dir=`echo ${obuild_current} | sed -e 's#/obuild##g'` | 
|---|
| 26 |  | 
|---|
| 27 | obuild_from='="@@absolute_dir@@"' | 
|---|
| 28 |  | 
|---|
| 29 | obuild_to='="'"${obuild_dir}"'"' | 
|---|
| 30 |  | 
|---|
| 31 | if test -e setup.sh ; then | 
|---|
| 32 | /bin/rm -f obuild_tmp | 
|---|
| 33 | sed -e "s#${obuild_from}#${obuild_to}#g" setup.sh > obuild_tmp | 
|---|
| 34 | /bin/mv obuild_tmp setup.sh | 
|---|
| 35 | /bin/rm -f obuild_tmp | 
|---|
| 36 | fi | 
|---|
| 37 |  | 
|---|
| 38 | if test -e setup.csh ; then | 
|---|
| 39 | /bin/rm -f obuild_tmp | 
|---|
| 40 | sed -e "s#${obuild_from}#${obuild_to}#g" setup.csh > obuild_tmp | 
|---|
| 41 | /bin/mv obuild_tmp setup.csh | 
|---|
| 42 | /bin/rm -f obuild_tmp | 
|---|
| 43 | fi | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.