fixed ENV for .bashrc and .zshrc
Some checks failed
Test setup and build APKs archlinux / Build-APK-Arch-Linux (push) Failing after 6m17s
Test setup and build APKs / Build-and-Create-Development-Environment (push) Successful in 11s

This commit is contained in:
2025-12-09 16:20:00 +01:00
parent 2144e61048
commit c34089f0bc
3 changed files with 24 additions and 3 deletions

23
dist/init_rc.sh vendored Normal file
View File

@@ -0,0 +1,23 @@
#!/bin/bash
# detect if either .bashrc or .zshrc is present
if [ -f "$HOME/.bashrc" ]; then
SHELL_RC="$HOME/.bashrc"
elif [ -f "$HOME/.zshrc" ]; then
SHELL_RC="$HOME/.zshrc"
else
echo "No .bashrc or .zshrc file found in home directory."
exit 1
fi
echo "Using shell rc file: $SHELL_RC"
# Check if content already exists in the shell rc file and if not, append it
if ! grep -q "export PATH=\$PATH:\$HOME/.local/bin" "$SHELL_RC"; then
echo "Adding .local/bin to PATH in $SHELL_RC"
echo 'export PATH=$PATH:$HOME/.local/bin' >> "$SHELL_RC"
else
echo ".local/bin is already in PATH in $SHELL_RC"
fi