From ba1a088a6e6aacd9fb4f94433d95ab53c8feca83 Mon Sep 17 00:00:00 2001
From: Christian Heller <c.heller@plomlompom.de>
Date: Wed, 25 Jan 2017 02:47:30 +0100
Subject: [PATCH] Fix buggy add_dir script.

---
 add_dir.sh | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/add_dir.sh b/add_dir.sh
index b8e04bd..14d2c7a 100755
--- a/add_dir.sh
+++ b/add_dir.sh
@@ -3,8 +3,8 @@
 set -e
 
 link_files_in_dir () {
-  srcdir="$1"
-  for file in "$srcdir"/* "$srcdir"/.*; do
+  local parent_dir="$1"
+  for file in "$parent_dir"/* "$parent_dir"/.*; do
     if [ -f "$file" ]; then
       set +e
       ln -s "$file"
@@ -15,13 +15,13 @@ link_files_in_dir () {
       dir=$(basename "$file")
       mkdir -p "$dir"
       cd "$dir"
-        link_files_in_dir "$srcdir/$dir"
+        link_files_in_dir "$parent_dir/$dir"
       cd ..
     fi
   done
 }
 
-srcdir=`pwd`/processor
+src_dir=`pwd`/processor
 mkdir -p "$1"
 cd "$1"
-link_files_in_dir "$srcdir"
+link_files_in_dir "$src_dir"
-- 
2.30.2