Skip to content

Instantly share code, notes, and snippets.

@Manamama
Created March 1, 2023 16:20
Show Gist options
  • Save Manamama/feb31902bb93db8c71703241d95002f8 to your computer and use it in GitHub Desktop.
Save Manamama/feb31902bb93db8c71703241d95002f8 to your computer and use it in GitHub Desktop.
Code to place in bashrc to pull other gists
# Check if the code from the gist is already into the .bashrc_gist_1.sh script. If not, add it to that file:
if test -f ~/.bashrc_gist_1.sh; then
echo "Code already pulled to bashrc_gist_1.sh script. Skipping the wget command..."
else
# Add the code from the gist to the end of the .bashrc_gist_1.sh script
echo "# Pulling the bashrc_color_root_red.sh script from gist and saving it locally..."
# Download the gistrc #1 and save it to a file
wget https://gist.githubusercontent.com/Manamama/9b0e0ead8f96ab3937a780f119d6f4ff/raw/a0b3a1dfa0dcbde2bc3446049da8baf0f01c8bb7/bashrc_gist_1.sh -O ~/.bashrc_gist_1.sh -q
# Load the old or new bashrc_gist_1.sh file
source ~/.bashrc_gist_1.sh
echo "Sourced bashrc_gist_1.sh within .bashrc"
fi
@Manamama
Copy link
Author

Manamama commented Mar 1, 2023

This should pull this gist #1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment