Last change
on this file since 4235 was
4235,
checked in by dubos, 5 years ago
|
simple_physics : DYNAMICO driver
|
-
Property svn:executable set to
*
|
File size:
536 bytes
|
Rev | Line | |
---|
[4229] | 1 | #!/bin/bash |
---|
[4235] | 2 | |
---|
| 3 | # NOTE : sed -i seems to work differently on GNU and OSX systems |
---|
| 4 | # a temporary file is used instead |
---|
| 5 | |
---|
| 6 | TMP=$(mktemp) |
---|
| 7 | |
---|
[4229] | 8 | for x in $* ; do |
---|
| 9 | # indent source file using emacs in batch mode |
---|
| 10 | # following standard settings of emacs f90-mode |
---|
[4233] | 11 | emacs -batch $x --eval '(f90-mode)' --eval '(indent-region (point-min) (point-max) nil)' --eval '(delete-trailing-whitespace)' -f save-buffer 2>/dev/null |
---|
[4229] | 12 | # remove blank lines at end of file |
---|
[4235] | 13 | sed -e :a -e '/^\n*$/{$d;N;};/\n$/ba' $x > $TMP |
---|
| 14 | cp -f $TMP $x |
---|
[4229] | 15 | done |
---|
[4235] | 16 | |
---|
| 17 | rm -f $TMP |
---|
Note: See
TracBrowser
for help on using the repository browser.