mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-17 18:06:59 +02:00
fix(app-shells/bash): Update /etc symlinks, use /usr/share/skel
Symlinks out of /etc to /usr should generally be relative, that way they work regardless of whether you are based at / or dealing with a new chroot you haven't entered yet, or a build root like /build/amd64-usr Namely the absolute links break cros_sdk which copies skel into home. Also switch to /usr/share/skel since other packages may need install things to that directory in the future.
This commit is contained in:
parent
346c44fbdb
commit
8dc9d76e5e
@ -138,18 +138,23 @@ src_install() {
|
||||
mv "${D}"/usr/bin/bash "${D}"/bin/ || die
|
||||
dosym bash /bin/rbash
|
||||
|
||||
insinto /usr/share/bash/defaults/
|
||||
doins "${FILESDIR}"/{bashrc,bash_logout}
|
||||
dosym /usr/share/bash/defaults/bash_logout /etc/bash/bash_logout
|
||||
dosym /usr/share/bash/defaults/bashrc /etc/bash/bashrc
|
||||
insinto /usr/share/bash/skel
|
||||
insinto /usr/share/bash
|
||||
for f in bash{_logout,rc} ; do
|
||||
doins "${FILESDIR}"/${f}
|
||||
dosym ../../usr/share/bash/${f} /etc/bash/${f}
|
||||
done
|
||||
insinto /usr/share/skel
|
||||
for f in bash{_logout,_profile,rc} ; do
|
||||
newins "${FILESDIR}"/dot-${f} .${f}
|
||||
dosym /usr/share/bash/skel/.${f} /etc/skel/.${f}
|
||||
dosym ../../usr/share/skel/.${f} /etc/skel/.${f}
|
||||
done
|
||||
|
||||
sed -i -e "s:#${USERLAND}#@::" "${D}"/etc/skel/.bashrc "${D}"/etc/bash/bashrc
|
||||
sed -i -e '/#@/d' "${D}"/etc/skel/.bashrc "${D}"/etc/bash/bashrc
|
||||
sed -i -e "s:#${USERLAND}#@::" \
|
||||
"${D}"/usr/share/skel/.bashrc \
|
||||
"${D}"/usr/share/bash/bashrc
|
||||
sed -i -e '/#@/d' \
|
||||
"${D}"/usr/share/skel/.bashrc \
|
||||
"${D}"/usr/share/bash/bashrc
|
||||
|
||||
if use plugins ; then
|
||||
exeinto /usr/$(get_libdir)/bash
|
||||
|
Loading…
Reference in New Issue
Block a user