| 1 |
#!/bin/sh |
| 2 |
###################################################################### |
| 3 |
# # |
| 4 |
# .symlinks for CBFlib/doc 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.6 5 Jul 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 -f" |
| 71 |
fi |
| 72 |
if [ ! -e cif_img.dic ] ; then |
| 73 |
$LN cif_img_1.7.11.dic cif_img.dic |
| 74 |
fi |
| 75 |
if [ ! -e cif_img.html ] ; then |
| 76 |
$LN cif_img_1.7.11.html cif_img.html |
| 77 |
fi |
| 78 |
if [ ! -e cif_img_1.7.2.dic ] ; then |
| 79 |
$LN cif_img_1.7.2_7Oct13.dic cif_img_1.7.2.dic |
| 80 |
fi |
| 81 |
if [ ! -e cif_img_1.7.2.html ] ; then |
| 82 |
$LN cif_img_1.7.2_7Oct13.html cif_img_1.7.2.html |
| 83 |
fi |
| 84 |
if [ ! -e cif_img_1.7.1.dic ] ; then |
| 85 |
$LN cif_img_1.7.1_10Aug13.dic cif_img_1.7.1.dic |
| 86 |
fi |
| 87 |
if [ ! -e cif_img_1.7.1.html ] ; then |
| 88 |
$LN cif_img_1.7.1_10Aug13.html cif_img_1.7.1.html |
| 89 |
fi |
| 90 |
if [ ! -e cif_img_1.7.dic ] ; then |
| 91 |
$LN cif_img_1.7.11.dic cif_img_1.7.dic |
| 92 |
fi |
| 93 |
if [ ! -e cif_img_1.7.html ] ; then |
| 94 |
$LN cif_img_1.7.11.html cif_img_1.7.html |
| 95 |
fi |
| 96 |
if [ ! -e cif_img_1.7.0.dic ] ; then |
| 97 |
$LN cif_img_1.7_18Jun13.dic cif_img_1.7.0.dic |
| 98 |
fi |
| 99 |
if [ ! -e cif_img_1.7.0.html ] ; then |
| 100 |
$LN cif_img_1.7_18Jun13.html cif_img_1.7.0.html |
| 101 |
fi |
| 102 |
if [ ! -e cif_img_1.6.4.html ] ; then |
| 103 |
$LN cif_img_1.6.4_2Jul11.html cif_img_1.6.4.html |
| 104 |
fi |
| 105 |
if [ ! -e cif_img_1.6.4.dic ] ; then |
| 106 |
$LN cif_img_1.6.4_2Jul11.dic cif_img_1.6.4.dic |
| 107 |
fi |
| 108 |
if [ ! -e cif_img_1.6.3.html ] ; then |
| 109 |
$LN cif_img_1.6.3_26Aug10.html cif_img_1.6.3.html |
| 110 |
fi |
| 111 |
if [ ! -e cif_img_1.6.html ] ; then |
| 112 |
$LN cif_img_1.6.4_2Jul11.html cif_img_1.6.html |
| 113 |
fi |
| 114 |
if [ ! -e cif_img_1.6.dic ] ; then |
| 115 |
$LN cif_img_1.6.4_2Jul11.dic cif_img_1.6.dic |
| 116 |
fi |
| 117 |
if [ ! -e cif_img_1.5.dic ] ; then |
| 118 |
$LN cif_img_1.5.4_28Jul07.dic cif_img_1.5.dic |
| 119 |
fi |
| 120 |
if [ ! -e cif_img_1.5.html ] ; then |
| 121 |
$LN cif_img_1.5.4_28Jul07.html cif_img_1.5.html |
| 122 |
fi |
| 123 |
if [ ! -e cif_img_1.5.4.html ] ; then |
| 124 |
$LN cif_img_1.5.4_28Jul07.html cif_img_1.5.4.html |
| 125 |
fi |
| 126 |
if [ ! -e cif_img_1_3_2.html ] ; then |
| 127 |
$LN cif_img_1.3.2.html cif_img_1_3_2.html |
| 128 |
fi |
| 129 |
for file in * |
| 130 |
do |
| 131 |
if [ -d "$file" ] ; then |
| 132 |
if [ -e "$file/.symlinks" ] ; then |
| 133 |
(cd "$file"; sh -c "./.symlinks $1") |
| 134 |
fi |
| 135 |
fi |
| 136 |
done |