From 04071c907fada50edd90fb0862d0ae6dc1e0c76c Mon Sep 17 00:00:00 2001 From: southerntofu Date: Sat, 25 Apr 2020 18:23:17 +0200 Subject: [PATCH] Update sample .git-build --- .git-build/git-build | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.git-build/git-build b/.git-build/git-build index 6a7e35c..d4643d1 100755 --- a/.git-build/git-build +++ b/.git-build/git-build @@ -5,20 +5,20 @@ # Add ~/bin to $PATH grep "\$HOME/bin" $HOME/.bashrc > /dev/null -[[ $? != 0 ]] && PATH="$PATH:/$HOME/bin" +[[ $? != 0 ]] && echo "PATH=\"$PATH:/$HOME/bin\"" >> $HOME/.bashrc && echo "Successfully setup ~/bin in the \$PATH. Please restart your session, or run: source ~/.bashrc" # Wait for git-build.sh to stop running SECONDS=0 -# TODO: make timeout configurable -echo test + while [[ $SECONDS < 60 ]]; do if [ ! -f $GITBUILDDIR/.LOCK ]; then # Copy the script cp git-build.sh $HOME/bin exit 0 fi - sleep 5 - SECONDS=$(( SECONDS + 5 )) + sleep 1 + SECONDS=$(( SECONDS + 1 )) done echo "The auto-updated script has timed out!" +exit 1