[Assorted-commits] SF.net SVN: assorted: [792] configs/trunk/setup-cron.bash
Brought to you by:
yangzhang
From: <yan...@us...> - 2008-05-11 19:18:44
|
Revision: 792 http://assorted.svn.sourceforge.net/assorted/?rev=792&view=rev Author: yangzhang Date: 2008-05-11 12:18:40 -0700 (Sun, 11 May 2008) Log Message: ----------- added check for a cooperative .bashrc (since these are loaded by the cron scripts) Modified Paths: -------------- configs/trunk/setup-cron.bash Modified: configs/trunk/setup-cron.bash =================================================================== --- configs/trunk/setup-cron.bash 2008-05-10 05:46:06 UTC (rev 791) +++ configs/trunk/setup-cron.bash 2008-05-11 19:18:40 UTC (rev 792) @@ -17,3 +17,15 @@ then crontab - < crontab else warn "crontab already exists; not overwriting." fi + +if fgrep PS1 ~/.bashrc && ! fgrep ~/.bashrc FORCE_BASHRC ~/.bashrc ; then + # NOTE: do not try to use "$( ... )" here instead of backticks, since that + # will break this! + warn "` cat << "EOF" +Ensure that your bashrc doesn't guard against non-interactive shells or, if it +does, that it responds to FORCE_BASHRC. For instance, on Ubuntu: + + [[ -z "$PS1" && -z "$FORCE_BASHRC" ]] && return +EOF +`" +fi This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |