| 1 |
#!/bin/sh |
| 2 |
###################################################################### |
| 3 |
# # |
| 4 |
# .symlinks for CBFlib directory # |
| 5 |
# # |
| 6 |
# originally a csh script by H. J. Bernstein # |
| 7 |
# converted to sh by J. Wright, 12 Jun 2007 # |
| 8 |
# # |
| 9 |
# Version 0.9.4.1 09 Mar 2014 # |
| 10 |
# # |
| 11 |
# Paul Ellis and # |
| 12 |
# Herbert J. Bernstein ([email protected]) # |
| 13 |
# # |
| 14 |
# (C) Copyright 2006 - 2014 Herbert J. Bernstein # |
| 15 |
# # |
| 16 |
###################################################################### |
| 17 |
|
| 18 |
###################################################################### |
| 19 |
# # |
| 20 |
# YOU MAY REDISTRIBUTE THE CBFLIB PACKAGE UNDER THE TERMS OF THE GPL # |
| 21 |
# # |
| 22 |
# ALTERNATIVELY YOU MAY REDISTRIBUTE THE CBFLIB API UNDER THE TERMS # |
| 23 |
# OF THE LGPL # |
| 24 |
# # |
| 25 |
###################################################################### |
| 26 |
|
| 27 |
########################### GPL NOTICES ############################## |
| 28 |
# # |
| 29 |
# This program is free software; you can redistribute it and/or # |
| 30 |
# modify it under the terms of the GNU General Public License as # |
| 31 |
# published by the Free Software Foundation; either version 2 of # |
| 32 |
# (the License, or (at your option) any later version. # |
| 33 |
# # |
| 34 |
# This program is distributed in the hope that it will be useful, # |
| 35 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of # |
| 36 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # |
| 37 |
# GNU General Public License for more details. # |
| 38 |
# # |
| 39 |
# You should have received a copy of the GNU General Public License # |
| 40 |
# along with this program; if not, write to the Free Software # |
| 41 |
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA # |
| 42 |
# 02111-1307 USA # |
| 43 |
# # |
| 44 |
###################################################################### |
| 45 |
|
| 46 |
######################### LGPL NOTICES ############################### |
| 47 |
# # |
| 48 |
# This library is free software; you can redistribute it and/or # |
| 49 |
# modify it under the terms of the GNU Lesser General Public # |
| 50 |
# License as published by the Free Software Foundation; either # |
| 51 |
# version 2.1 of the License, or (at your option) any later version. # |
| 52 |
# # |
| 53 |
# This library is distributed in the hope that it will be useful, # |
| 54 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of # |
| 55 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # |
| 56 |
# Lesser General Public License for more details. # |
| 57 |
# # |
| 58 |
# You should have received a copy of the GNU Lesser General Public # |
| 59 |
# License along with this library; if not, write to the Free # |
| 60 |
# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, # |
| 61 |
# MA 02110-1301 USA # |
| 62 |
# # |
| 63 |
###################################################################### |
| 64 |
|
| 65 |
# Usage ./.symlinks [--use_cp] |
| 66 |
|
| 67 |
if [ ${1:-NOARG} = "--use_cp" ] ; then |
| 68 |
LN="cp -p" |
| 69 |
else |
| 70 |
LN="ln -s" |
| 71 |
fi |
| 72 |
if [ ! -e index.html ] ; then |
| 73 |
$LN README.html index.html |
| 74 |
fi |
| 75 |
if [ ! -e gpl.txt ] ; then |
| 76 |
$LN doc/gpl.txt gpl.txt |
| 77 |
fi |
| 78 |
if [ ! -e lgpl.txt ] ; then |
| 79 |
$LN doc/lgpl.txt lgpl.txt |
| 80 |
fi |
| 81 |
if [ ! -e CBFlib.tar.gz ] ; then |
| 82 |
$LN ../CBFlib-0.9.5.tar.gz CBFlib.tar.gz |
| 83 |
fi |
| 84 |
if [ ! -e template_adscquantum315_3072x3072.cbf ] ; then |
| 85 |
$LN examples/template_adscquantum315_3072x3072.cbf template_adscquantum315_3072x3072.cbf |
| 86 |
fi |
| 87 |
if [ ! -e template_adscquantum4_2304x2304.cbf ] ; then |
| 88 |
$LN examples/template_adscquantum4_2304x2304.cbf template_adscquantum4_2304x2304.cbf |
| 89 |
fi |
| 90 |
if [ ! -e template_mar345_2300x2300.cbf ] ; then |
| 91 |
$LN examples/template_mar345_2300x2300.cbf template_mar345_2300x2300.cbf |
| 92 |
fi |
| 93 |
if [ ! -e template_pilatus6m_2463x2527.cbf ] ; then |
| 94 |
$LN examples/template_pilatus6m_2463x2527.cbf template_pilatus6m_2463x2527.cbf |
| 95 |
fi |
| 96 |
for file in * |
| 97 |
do |
| 98 |
if [ -d "$file" ] ; then |
| 99 |
if [ -e "$file/.symlinks" ] ; then |
| 100 |
(cd "$file"; sh -c "./.symlinks $1") |
| 101 |
fi |
| 102 |
fi |
| 103 |
done |