Created
October 30, 2022 15:30
-
-
Save davidliyutong/1ae46c13bd0f25e5bb651ece7e64b74a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Copyright [email protected] | |
already_run=$(cat /root/.bashrc | grep "source /openbayes/home/.bashrc") | |
if test -n "$already_run"; then | |
echo -e '\n\n################ \n\nYou have already sourced /openbayes/home/.bashrc, no need to run restore-from-shutdown\n\n################ \n\n' | |
else | |
echo "source /openbayes/home/.bashrc" >> /root/.bashrc | |
echo -e '\n\n################ \n\nAppend /openbayes/home/.bashrc to /root/.bashrc, done !\n\n################ \n\n" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment