Revert "Include `libtool` and `.nice` files when replacing sandbox paths (#644)" (#648)

This reverts commit 0859891060.
This commit is contained in:
UebelAndre 2021-05-16 14:53:04 -07:00 committed by GitHub
parent 71ebe2b3fd
commit 66cd7dc9d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 12 additions and 17 deletions

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"