]>
git.ipfire.org Git - thirdparty/squid.git/blob - errors/alias-link.sh
3 ## Copyright (C) 1996-2018 The Squid Software Foundation and contributors
5 ## Squid software is distributed under GPLv2+ license and includes
6 ## contributions from numerous individuals and organizations.
7 ## Please see the COPYING and CONTRIBUTORS files for details.
11 # Generate Symlinks for a set of aliases.
12 # Our base content is the bundled .po translation output
14 # This file creates the authoritative ISO aliases.
22 if ! test -f ${ALIASFILE} ; then
23 echo "FATAL: Alias file ${ALIASFILE} does not exist!"
27 if ! test -d ${DIR} ; then
28 echo "WARNING: Destination directory does not exist. Nothing to do."
32 # Parse the alias file
34 while read base aliases
; do
35 # file may be commented or have empty lines
36 if test "${base}" = "#" ||
test "${base}" = ""; then
39 # ignore destination languages that do not exist. (no dead links)
40 if ! test -x ${DIR}/${base} ; then
41 echo "WARNING: ${base} translations do not exist. Nothing to do for: ${aliases}"
45 # split aliases based on whitespace and create a symlink for each
46 # Remove and replace any pre-existing content/link
47 for alia
in ${aliases}; do
48 ${RM} -f -r ${DIR}/${alia} ||
exit 1
49 ${LN} -s ${base} ${DIR}/${alia} ||
exit 1