From 2b50ed436ebce2baede0a788c404e59997f5cac8 Mon Sep 17 00:00:00 2001 From: ceriel Date: Tue, 19 Apr 1988 16:57:19 +0000 Subject: [PATCH] Added check that script is started from proper directory --- first/first | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/first/first b/first/first index 3cb05552..1b07bca8 100755 --- a/first/first +++ b/first/first @@ -1,3 +1,13 @@ +: check that the script is started from the "first" directory +p=`pwd` +case `basename $p` in +first) + ;; +*) + echo "this script must be started from the 'first' directory" + exit 3 + ;; +esac : check $PATH first if sh ckpath then :