Spacing in setup.sh
svn path=/nixpkgs/branches/stdenv-updates/; revision=9738
This commit is contained in:
parent
a4326fe9dc
commit
f2b2932ee2
@ -9,23 +9,23 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
addToSearchPathWithCustomDelimiter() {
|
addToSearchPathWithCustomDelimiter() {
|
||||||
local delimiter=$1
|
local delimiter=$1
|
||||||
local varName=$2
|
local varName=$2
|
||||||
local needDir=$3
|
local needDir=$3
|
||||||
local addDir=${4:-$needDir}
|
local addDir=${4:-$needDir}
|
||||||
local prefix=$5
|
local prefix=$5
|
||||||
if [ -d $prefix$needDir ]; then
|
if [ -d $prefix$needDir ]; then
|
||||||
if [ -z ${!varName} ]; then
|
if [ -z ${!varName} ]; then
|
||||||
eval export ${varName}=${prefix}$addDir
|
eval export ${varName}=${prefix}$addDir
|
||||||
else
|
else
|
||||||
eval export ${varName}=${!varName}${delimiter}${prefix}$addDir
|
eval export ${varName}=${!varName}${delimiter}${prefix}$addDir
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
addToSearchPath()
|
addToSearchPath()
|
||||||
{
|
{
|
||||||
addToSearchPathWithCustomDelimiter "${PATH_DELIMITER}" "$@"
|
addToSearchPathWithCustomDelimiter "${PATH_DELIMITER}" "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Set up the initial path.
|
# Set up the initial path.
|
||||||
@ -217,21 +217,21 @@ if test "$NIX_DEBUG" = "1"; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
stripDirs() {
|
stripDirs() {
|
||||||
local dirs="$1"
|
local dirs="$1"
|
||||||
local stripFlags="$2"
|
local stripFlags="$2"
|
||||||
local dirsNew=
|
local dirsNew=
|
||||||
|
|
||||||
for d in ${dirs}; do
|
for d in ${dirs}; do
|
||||||
if test -d "$prefix/$d"; then
|
if test -d "$prefix/$d"; then
|
||||||
dirsNew="${dirsNew} $prefix/$d "
|
dirsNew="${dirsNew} $prefix/$d "
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
dirs=${dirsNew}
|
dirs=${dirsNew}
|
||||||
|
|
||||||
if test -n "${dirs}"; then
|
if test -n "${dirs}"; then
|
||||||
echo $dirs
|
echo $dirs
|
||||||
find $dirs -type f -print0 | xargs -0 strip $stripFlags || true
|
find $dirs -type f -print0 | xargs -0 strip $stripFlags || true
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
@ -751,33 +751,33 @@ fixupW() {
|
|||||||
|
|
||||||
eval "$preFixup"
|
eval "$preFixup"
|
||||||
|
|
||||||
forceShare=${forceShare:=man doc info}
|
forceShare=${forceShare:=man doc info}
|
||||||
if test -n "$forceShare"; then
|
if test -n "$forceShare"; then
|
||||||
for d in $forceShare; do
|
for d in $forceShare; do
|
||||||
if test -d "$prefix/$d"; then
|
if test -d "$prefix/$d"; then
|
||||||
if test -d "$prefix/share/$d"; then
|
if test -d "$prefix/share/$d"; then
|
||||||
echo "Both $d/ and share/$d/ exists!"
|
echo "Both $d/ and share/$d/ exists!"
|
||||||
else
|
else
|
||||||
echo Fixing location of $d/ subdirectory
|
echo Fixing location of $d/ subdirectory
|
||||||
ensureDir $prefix/share
|
ensureDir $prefix/share
|
||||||
if test -w $prefix/share; then
|
if test -w $prefix/share; then
|
||||||
mv -v $prefix/$d $prefix/share
|
mv -v $prefix/$d $prefix/share
|
||||||
ln -sv share/$d $prefix
|
ln -sv share/$d $prefix
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "No $d/ subdirectory, skipping."
|
echo "No $d/ subdirectory, skipping."
|
||||||
fi
|
fi
|
||||||
done;
|
done;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# TODO : strip _only_ ELF executables, and return || fail here...
|
# TODO : strip _only_ ELF executables, and return || fail here...
|
||||||
if test -z "$dontStrip"; then
|
if test -z "$dontStrip"; then
|
||||||
echo "Stripping debuging symbols from files in"
|
echo "Stripping debuging symbols from files in"
|
||||||
stripDirs "${stripDebugList:-lib}" -S
|
stripDirs "${stripDebugList:-lib}" -S
|
||||||
echo "Stripping all symbols from files in"
|
echo "Stripping all symbols from files in"
|
||||||
stripDirs "${stripAllList:-bin sbin}" -s
|
stripDirs "${stripAllList:-bin sbin}" -s
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$havePatchELF" = 1 -a -z "$dontPatchELF"; then
|
if test "$havePatchELF" = 1 -a -z "$dontPatchELF"; then
|
||||||
@ -789,10 +789,10 @@ fixupW() {
|
|||||||
echo "$propagatedBuildInputs" > "$out/nix-support/propagated-build-inputs"
|
echo "$propagatedBuildInputs" > "$out/nix-support/propagated-build-inputs"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test -n "$setupHook"; then
|
if test -n "$setupHook"; then
|
||||||
ensureDir "$out/nix-support"
|
ensureDir "$out/nix-support"
|
||||||
substituteAll "$setupHook" "$out/nix-support/setup-hook"
|
substituteAll "$setupHook" "$out/nix-support/setup-hook"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
eval "$postFixup"
|
eval "$postFixup"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user