diff options
Diffstat (limited to 'nuttx/configs/sam4s-xplained/nsh/setenv.sh')
-rwxr-xr-x | nuttx/configs/sam4s-xplained/nsh/setenv.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/nuttx/configs/sam4s-xplained/nsh/setenv.sh b/nuttx/configs/sam4s-xplained/nsh/setenv.sh index 493fe18c1..0e97bb38b 100755 --- a/nuttx/configs/sam4s-xplained/nsh/setenv.sh +++ b/nuttx/configs/sam4s-xplained/nsh/setenv.sh @@ -31,6 +31,20 @@ # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. # +if [ "$_" = "$0" ] ; then + echo "You must source this script, not run it!" 1>&2 + exit 1 +fi + +WD=`pwd` +if [ ! -x "setenv.sh" ]; then + echo "This script must be executed from the top-level NuttX build directory" + exit 1 +fi + +if [ -z "${PATH_ORIG}" ]; then + export PATH_ORIG="${PATH}" +fi # This is the Cygwin path to the location where I installed the Atmel GCC # toolchain under Windows. You will also have to edit this if you install |