Skip to content

Instantly share code, notes, and snippets.

@davidliyutong
Created October 30, 2022 15:30
Show Gist options
  • Save davidliyutong/1ae46c13bd0f25e5bb651ece7e64b74a to your computer and use it in GitHub Desktop.
Save davidliyutong/1ae46c13bd0f25e5bb651ece7e64b74a to your computer and use it in GitHub Desktop.
#!/bin/bash
# Copyright davidliyutong@sjtu.edu.cn
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