This reverts commit 0859891060
.
This commit is contained in:
parent
71ebe2b3fd
commit
66cd7dc9d4
|
@ -68,7 +68,7 @@ if [ -d "$1" ]; then
|
|||
SAVEIFS=$IFS
|
||||
IFS=$'\n'
|
||||
# Find all real files. Symlinks are assumed to be relative to something within the directory we're seaching and thus ignored
|
||||
local files=$(find -P $1 \\( -type f -and \\( -name "libtool" -or -name "*.pc" -or -name "*.lai" -or -name "*.la" -or -name "*-config" -or -name "*.nice" -or -name "*.mk" -or -name "*.cmake" \\) \\))
|
||||
local files=$(find -P $1 \\( -type f -and \\( -name "*.pc" -or -name "*.la" -or -name "*-config" -or -name "*.mk" -or -name "*.cmake" \\) \\))
|
||||
IFS=$SAVEIFS
|
||||
for file in ${files[@]}; do
|
||||
sed -i 's@'"$2"'@'"$3"'@g' "${file}"
|
||||
|
@ -114,9 +114,8 @@ mkdir -p "$target"
|
|||
if [[ -f "$1" ]]; then
|
||||
# In order to be able to use `replace_in_files`, we ensure that we create copies of specfieid
|
||||
# files so updating them is possible.
|
||||
local input_basename="$(basename "$1")"
|
||||
if [[ "$input_basename" == "libtool" || "$1" == *.pc || "$1" == *.la || "$1" == *.lai || "$1" == *-config || "$1" == *.nice || "$1" == *.mk || "$1" == *.cmake ]]; then
|
||||
local dest="$target/$input_basename"
|
||||
if [[ "$1" == *.pc || "$1" == *.la || "$1" == *-config || "$1" == *.mk || "$1" == *.cmake ]]; then
|
||||
dest="$target/$(basename $1)"
|
||||
cp "$1" "$dest" && chmod +w "$dest" && touch -r "$1" "$dest"
|
||||
else
|
||||
ln -s -f -t "$target" "$1"
|
||||
|
|
|
@ -68,7 +68,7 @@ if [ -d "$1" ]; then
|
|||
SAVEIFS=$IFS
|
||||
IFS=$'\n'
|
||||
# Find all real files. Symlinks are assumed to be relative to something within the directory we're seaching and thus ignored
|
||||
local files=$(find -P -f $1 \\( -type f -and \\( -name "libtool" -or -name "*.pc" -or -name "*.lai" -or -name "*.la" -or -name "*-config" -or -name "*.nice" -or -name "*.mk" -or -name "*.cmake" \\) \\))
|
||||
local files=$(find -P -f $1 \\( -type f -and \\( -name "*.pc" -or -name "*.la" -or -name "*-config" -or -name "*.mk" -or -name "*.cmake" \\) \\))
|
||||
IFS=$SAVEIFS
|
||||
for file in ${files[@]}; do
|
||||
sed -i '' -e 's@'"$2"'@'"$3"'@g' "${file}"
|
||||
|
@ -138,9 +138,8 @@ mkdir -p "$target"
|
|||
if [[ -f "$1" ]]; then
|
||||
# In order to be able to use `replace_in_files`, we ensure that we create copies of specfieid
|
||||
# files so updating them is possible.
|
||||
local input_basename="$(basename "$1")"
|
||||
if [[ "$input_basename" == "libtool" || "$1" == *.pc || "$1" == *.la || "$1" == *.lai || "$1" == *-config || "$1" == *.nice || "$1" == *.mk || "$1" == *.cmake ]]; then
|
||||
local dest="$target/$input_basename"
|
||||
if [[ "$1" == *.pc || "$1" == *.la || "$1" == *-config || "$1" == *.mk || "$1" == *.cmake ]]; then
|
||||
dest="$target/$(basename $1)"
|
||||
cp "$1" "$dest" && chmod +w "$dest" && touch -r "$1" "$dest"
|
||||
else
|
||||
ln -s -f "$1" "$target"
|
||||
|
|
|
@ -115,9 +115,8 @@ mkdir -p "$target"
|
|||
if [[ -f "$1" ]]; then
|
||||
# In order to be able to use `replace_in_files`, we ensure that we create copies of specfieid
|
||||
# files so updating them is possible.
|
||||
local input_basename="$(basename "$1")"
|
||||
if [[ "$input_basename" == "libtool" || "$1" == *.pc || "$1" == *.la || "$1" == *.lai || "$1" == *-config || "$1" == *.nice || "$1" == *.mk || "$1" == *.cmake ]]; then
|
||||
local dest="$target/$input_basename"
|
||||
if [[ "$1" == *.pc || "$1" == *.la || "$1" == *-config || "$1" == *.mk || "$1" == *.cmake ]]; then
|
||||
dest="$target/$(basename $1)"
|
||||
cp "$1" "$dest" && chmod +w "$dest" && touch -r "$1" "$dest"
|
||||
else
|
||||
ln -s -f -t "$target" "$1"
|
||||
|
|
|
@ -23,9 +23,8 @@ mkdir -p "$target"
|
|||
if [[ -f "$1" ]]; then
|
||||
# In order to be able to use `replace_in_files`, we ensure that we create copies of specfieid
|
||||
# files so updating them is possible.
|
||||
local input_basename="$(basename "$1")"
|
||||
if [[ "$input_basename" == "libtool" || "$1" == *.pc || "$1" == *.la || "$1" == *.lai || "$1" == *-config || "$1" == *.nice || "$1" == *.mk || "$1" == *.cmake ]]; then
|
||||
local dest="$target/$input_basename"
|
||||
if [[ "$1" == *.pc || "$1" == *.la || "$1" == *-config || "$1" == *.mk || "$1" == *.cmake ]]; then
|
||||
dest="$target/$(basename $1)"
|
||||
cp "$1" "$dest" && chmod +w "$dest" && touch -r "$1" "$dest"
|
||||
else
|
||||
ln -s -f -t "$target" "$1"
|
||||
|
|
|
@ -23,9 +23,8 @@ mkdir -p "$target"
|
|||
if [[ -f "$1" ]]; then
|
||||
# In order to be able to use `replace_in_files`, we ensure that we create copies of specfieid
|
||||
# files so updating them is possible.
|
||||
local input_basename="$(basename "$1")"
|
||||
if [[ "$input_basename" == "libtool" || "$1" == *.pc || "$1" == *.la || "$1" == *.lai || "$1" == *-config || "$1" == *.nice || "$1" == *.mk || "$1" == *.cmake ]]; then
|
||||
local dest="$target/$input_basename"
|
||||
if [[ "$1" == *.pc || "$1" == *.la || "$1" == *-config || "$1" == *.mk || "$1" == *.cmake ]]; then
|
||||
dest="$target/$(basename $1)"
|
||||
cp "$1" "$dest" && chmod +w "$dest" && touch -r "$1" "$dest"
|
||||
else
|
||||
ln -s -f "$1" "$target"
|
||||
|
|
Loading…
Reference in New Issue