Add /etc/profile.d directory support
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
name: bash
|
name: bash
|
||||||
description: The Bourne-Again Shell
|
description: The Bourne-Again Shell
|
||||||
version: 5.2.21
|
version: 5.2.21
|
||||||
revision: 3
|
revision: 4
|
||||||
url: https://www.gnu.org/software/bash/
|
url: https://www.gnu.org/software/bash/
|
||||||
license: GPL3-or-later
|
license: GPL3-or-later
|
||||||
architecture: any
|
architecture: any
|
||||||
|
|||||||
@@ -22,12 +22,17 @@ if [ -f /etc/locale.conf ]; then
|
|||||||
set +a
|
set +a
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -d /etc/profile.d ]; then
|
||||||
|
for f in /etc/profile.d/*.sh; do
|
||||||
|
[ -r "$f" ] && source "$f"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
# Unsetting functions
|
# Unsetting functions
|
||||||
unset -f append_path
|
unset -f append_path
|
||||||
|
|
||||||
# Run /etc/bashrc if in an interactive terminal
|
# Run /etc/bashrc if in an interactive terminal
|
||||||
if [[ $- == *i* ]]
|
if [[ $- == *i* ]]; then
|
||||||
then
|
|
||||||
. /etc/bashrc
|
. /etc/bashrc
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -32,10 +32,14 @@ check() {
|
|||||||
# This function is used to move the compiled files into the output directory
|
# This function is used to move the compiled files into the output directory
|
||||||
package() {
|
package() {
|
||||||
make DESTDIR="$BPM_OUTPUT" install
|
make DESTDIR="$BPM_OUTPUT" install
|
||||||
|
|
||||||
|
# Create /bin/sh symlink to bash
|
||||||
ln -s bash "$BPM_OUTPUT"/usr/bin/sh
|
ln -s bash "$BPM_OUTPUT"/usr/bin/sh
|
||||||
mkdir -p "$BPM_OUTPUT"/etc
|
|
||||||
cp ../profile "$BPM_OUTPUT"/etc/profile
|
# Configuration files
|
||||||
cp ../bashrc "$BPM_OUTPUT"/etc/bashrc
|
install -Dm644 ../profile "$BPM_OUTPUT"/etc/profile
|
||||||
|
install -Dm644 ../bashrc "$BPM_OUTPUT"/etc/bashrc
|
||||||
|
install -d "$BPM_OUTPUT"/etc/profile.d
|
||||||
|
|
||||||
install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/bash/COPYING
|
install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/bash/COPYING
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user