From 9354fc104e07d2754593e22a4f4cb3a6bc344400 Mon Sep 17 00:00:00 2001
From: Antonio Ospite <ospite@studenti.unina.it>
Date: Wed, 11 Sep 2013 22:51:08 +0200
Subject: [PATCH] setenv: warn that the script is meant to be sourced, not
 executed

---
 setenv | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/setenv b/setenv
index 5b85830..e5c51a5 100644
--- a/setenv
+++ b/setenv
@@ -1,4 +1,6 @@
 #!/bin/sh
-# This file is meant to be sourced, not executed.
+
+[ "$0" = "$(basename $SHELL)" ] || { echo "This script is meant to be sourced, not executed" 1>&2; exit 1; }
+
 export ANDROID_HOME=$HOME/Android/android-sdk-linux
 export PATH=$PATH:$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools
-- 
2.1.4