From c90d0af323f7b2b117a15bb2cf97152a7c2d50c4 Mon Sep 17 00:00:00 2001 From: Tyler Akins Date: Fri, 23 Jan 2015 17:47:31 +0000 Subject: [PATCH] Forcing script execution to be in a particular directory --- demo/important-file | 2 ++ 1 file changed, 2 insertions(+) diff --git a/demo/important-file b/demo/important-file index 6f3d94f..93ebea8 100755 --- a/demo/important-file +++ b/demo/important-file @@ -1,5 +1,7 @@ #!/bin/bash +cd "$(dirname "$0")"/.. + date-string() { date; } wrapper() { echo -n "*** $1 ***"; }