foo-user-ejb are now merged into foo-ejb to ease deployment.
[jprojects-scripts.git] / cp-dist.sh
1 #!/bin/bash
2
3 . ./.jprojects.sh || exit 255
4
5 for project in ${LIST}; do
6         if [ -f "${project}/dist.sh" ]
7         then
8                 echo "$0: Copying dist.sh to '${project}' ..."
9                 cp -v dist.sh "${project}/" || exit 255
10         fi
11
12         if [ ! -d "${project}/docs" -o "$1" = "f" ]
13         then
14                 echo "$0: GNU-ifying project '${project}' ..."
15                 cp -rv docs "${project}/" || exit 255
16                 cd "${JPROJECTS_HOME}/${project}"
17                 echo "$0: git add ..."
18                 git add docs || exit 255
19                 echo "$0: git rm ..."
20                 git rm -f COPYING
21                 echo "$0: git mv ..."
22                 git mv docs/COPYING . || exit 255
23                 cd "${JPROJECTS_HOME}"
24         else
25                 echo "$0: Project '${project}' already prepared."
26         fi
27 done
28
29 echo "$0: All done."
30 exit 0