bag-of-scripts-and-configur.../install-bashrc_local
Nils Norman Haukås 187bc498f2 🐛 fix import script
2022-01-02 17:58:05 +01:00

20 lines
448 B
Bash
Executable file

#!/usr/bin/env bash
if [[ "Linux" != *"$(uname -s)"* ]]; then
echo "Not sourcing .bashrc_local on anything but Linux"
elif grep -q bashrc_local ~/.bashrc; then
echo "Already sourcing .bashrc_local, skipping."
else
IMPORT_STATEMENT=$(cat << "EOF"
# Import additional functionality from dotfile setup.
if [ -f "/home/nilsnh/.bashrc_local" ]; then
source "/home/nilsnh/.bashrc_local"
fi
EOF
)
echo "$IMPORT_STATEMENT" >> ~/.bashrc
fi
exit 0