mirror of
https://github.com/vattam/BSDGames.git
synced 2025-12-21 03:14:50 +00:00
new upstream
git-svn-id: file:///srv/svn/joey/trunk/src/packages/bsdgames@10080 a4a2c43b-8ac3-0310-8836-e0e880c912e2
This commit is contained in:
9
substscr
9
substscr
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
# substscr - substitute parameters to create a file from a .in.
|
||||
#
|
||||
# Copyright (c) 1999 Joseph Samuel Myers.
|
||||
# Copyright (c) 1999, 2004 Joseph Samuel Myers.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
# Fourth argument is the target file.
|
||||
|
||||
# The target gets its permissions from the source.
|
||||
# The target gets its execute permissions from the source.
|
||||
|
||||
set -e
|
||||
|
||||
@@ -59,7 +59,6 @@ target="$4"
|
||||
if echo $action |grep -q g; then
|
||||
echo "Generating $target from $source"
|
||||
rm -f $target
|
||||
cp "$source" "$target" # set permissions
|
||||
|
||||
case "$style" in
|
||||
(c)
|
||||
@@ -84,6 +83,10 @@ if echo $action |grep -q g; then
|
||||
esac
|
||||
|
||||
sed -f subst.sed <"$source" >>"$target"
|
||||
|
||||
if [ -x "$source" ]; then
|
||||
chmod a+x "$target"
|
||||
fi
|
||||
fi
|
||||
|
||||
if echo $action |grep -q r; then
|
||||
|
||||
Reference in New Issue
Block a user