From c6694f6a289c99c1f218c298b2a64b335207c675 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Tue, 25 Aug 2026 02:34:54 +0300 Subject: [PATCH] ports: Create files in /etc/profile.d instead of modifying shellrc --- ports/ncurses/build.sh | 4 ++-- ports/vim/build.sh | 4 ++-- ports/xbanan/build.sh | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ports/ncurses/build.sh b/ports/ncurses/build.sh index 801be96c..e0265c75 100755 --- a/ports/ncurses/build.sh +++ b/ports/ncurses/build.sh @@ -23,6 +23,6 @@ post_install() { ln -sv libncursesw.so "$DESTDIR/usr/lib/libncurses.so" - shellrc="$BANAN_SYSROOT/home/user/.shellrc" - grep -q 'export NCURSES_NO_UTF8_ACS=' "$shellrc" || echo 'export NCURSES_NO_UTF8_ACS=1' >> "$shellrc" + mkdir -p "$DESTDIR/etc/profile.d" + echo 'export NCURSES_NO_UTF8_ACS=1' > "$DESTDIR/etc/profile.d/ncurses.sh" } diff --git a/ports/vim/build.sh b/ports/vim/build.sh index 3d1e31f5..b0c6f65b 100755 --- a/ports/vim/build.sh +++ b/ports/vim/build.sh @@ -17,6 +17,6 @@ CONFIGURE_OPTIONS=( ) post_install() { - shellrc="$BANAN_SYSROOT/home/user/.shellrc" - grep -q 'export EDITOR=' "$shellrc" || echo 'export EDITOR=vim' >> "$shellrc" + mkdir -p "$DESTDIR/etc/profile.d" + echo 'export EDITOR=vim' > "$DESTDIR/etc/profile.d/vim.sh" } diff --git a/ports/xbanan/build.sh b/ports/xbanan/build.sh index 8c60068e..0f47fa5a 100755 --- a/ports/xbanan/build.sh +++ b/ports/xbanan/build.sh @@ -28,6 +28,6 @@ install() { } post_install() { - shellrc="$BANAN_SYSROOT/home/user/.shellrc" - grep -q 'export DISPLAY=' "$shellrc" || echo 'export DISPLAY=:69' >> "$shellrc" + mkdir -p "$DESTDIR/etc/profile.d" + echo 'export DISPLAY=:69' > "$DESTDIR/etc/profile.d/xbanan.sh" }