|
|
@ -498,15 +498,16 @@ function alt_future_linking() {
|
|
|
|
# a template is defined, process the template
|
|
|
|
# a template is defined, process the template
|
|
|
|
debug "Creating $filename from template $target"
|
|
|
|
debug "Creating $filename from template $target"
|
|
|
|
[ -n "$loud" ] && echo "Creating $filename from template $target"
|
|
|
|
[ -n "$loud" ] && echo "Creating $filename from template $target"
|
|
|
|
|
|
|
|
# remove any existing symlink before processing template
|
|
|
|
|
|
|
|
[ -L "$filename" ] && rm -f "$filename"
|
|
|
|
"$template_cmd" "$target" "$filename"
|
|
|
|
"$template_cmd" "$target" "$filename"
|
|
|
|
elif [ -n "$target" ]; then
|
|
|
|
elif [ -n "$target" ]; then
|
|
|
|
# a link target is defined, create symlink
|
|
|
|
# a link target is defined, create symlink
|
|
|
|
debug "Linking $target to $filename"
|
|
|
|
debug "Linking $target to $filename"
|
|
|
|
[ -n "$loud" ] && echo "Linking $target to $filename"
|
|
|
|
[ -n "$loud" ] && echo "Linking $target to $filename"
|
|
|
|
if [ "$do_copy" -eq 1 ]; then
|
|
|
|
if [ "$do_copy" -eq 1 ]; then
|
|
|
|
if [ -L "$filename" ]; then
|
|
|
|
# remove any existing symlink before copying
|
|
|
|
rm -f "$filename"
|
|
|
|
[ -L "$filename" ] && rm -f "$filename"
|
|
|
|
fi
|
|
|
|
|
|
|
|
cp -f "$target" "$filename"
|
|
|
|
cp -f "$target" "$filename"
|
|
|
|
else
|
|
|
|
else
|
|
|
|
ln -nfs "$target" "$filename"
|
|
|
|
ln -nfs "$target" "$filename"
|
|
|
|