1#!/bin/sh 2########################################################################### 3#ident "@(#)MKLINKS 1.1 17/11/16 " 4########################################################################### 5# Written 2008-2017 by J. Schilling 6########################################################################### 7# Copyright (c) 2008-2017 J. Schilling 8########################################################################### 9# The contents of this file are subject to the terms of the 10# Common Development and Distribution License, Version 1.0 only 11# (the "License"). You may not use this file except in compliance 12# with the License. 13# 14# See the file CDDL.Schily.txt in this distribution for details. 15# A copy of the CDDL is also available via the Internet at 16# http://www.opensource.org/licenses/cddl1.txt 17# 18# When distributing Covered Code, include this CDDL HEADER in each 19# file and include the License file CDDL.Schily.txt from this distribution. 20########################################################################### 21symlink="ln -s" 22MKLINKS_TEST=${MKLINKS_TEST-:} 23if [ ".$MKLINKS_COPY" = '.' ]; then 24 rm -f xxzzy.123 xxzzy.345 25 echo test > xxzzy.123 26 $symlink xxzzy.123 xxzzy.345 27 test $? = 0 || symlink=cp 28 test -r xxzzy.345 || symlink=cp 29 ${MKLINKS_TEST} -h xxzzy.345 || symlink=cp 30 rm -f xxzzy.123 xxzzy.345 31else 32 symlink=cp 33fi 34########################################################################### 35 36$symlink ../sh/printf.c . 37