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