mirror of
https://github.com/arthur-pbty/arthur-os.git
synced 2026-08-01 20:28:16 +02:00
8 lines
316 B
Bash
8 lines
316 B
Bash
echo "Ensure interactive shell check is at the top of .bashrc"
|
|
|
|
BASHRC="$HOME/.bashrc"
|
|
|
|
if [[ -f $BASHRC ]] && ! grep -q '\[\[ $- != \*i\* \]\] && return' "$BASHRC"; then
|
|
sed -i '1i# If not running interactively, don'\''t do anything (leave this at the top of this file)\n[[ $- != *i* ]] && return\n' "$BASHRC"
|
|
fi
|