Update docstrings
[maxima.git] / admin / make_share_list
blobfbd0478661368254c4ef54198edb7dfb526f64b9
1 #!/bin/sh
3 # Find the location of the share directory in the src tree
4 # Assumes this script is in a first level subdirectory in the same tree
5 SHAREDIR="$( cd "$(dirname "$0")/../share" 1>/dev/null 2>/dev/null; pwd -P )"
6 echo "Share directory is ${SHAREDIR}"
9 echo "# DO NOT EDIT sharefiles.mk. It is automatically generated"
10 echo "# by running make. This list is generated by"
11 echo "# ../admin/make_share_list"
12 echo "# But note that is is checked in so if there are new files"
13 echo "# or deleted files, be sure to check in this file with the"
14 echo "# changes."
15 echo ""
16 echo "sharefiles = \\"
18 # Find all the files in the share directory, and then filter the
19 # output. We remove lots of files that we don't want installed like
20 # files in the fortran directories, CVS files, and other random files.
22 # Then remove the leading dot and append a \ to each line, but not the
23 # last line.
25 (cd "${SHAREDIR}"; find . -type f) |
26 egrep -v '\.ERR$' |
27 egrep -v 'CVS|Makefile(\.in|\.am)?|^\./Makefile|\.gitignore' |
28 egrep -v '/fortran/' |
29 egrep -v 'colnew/ex./' |
30 egrep -v 'lbfgs/.*\.f' |
31 egrep -v '/\.#' |
32 egrep -v '~|#' |
33 sed -e 's%\./%%' -e 's%$% \\%' |
34 sort -f -d |
35 sed '$s/\\$//'
36 ) > sharefiles.mk.$$
38 # If the original and new versions are different, update the original
39 # with the new information, otherwise remove the generated file.
41 cmp sharefiles.mk sharefiles.mk.$$ >/dev/null 2>/dev/null || mv sharefiles.mk.$$ sharefiles.mk
43 # remove temporary sharefile.mk.$$ - if it still exists.
44 rm -f sharefiles.mk.$$