From a6b002bb255236e1e96c9d71699dd5e3f6a10a10 Mon Sep 17 00:00:00 2001
From: schaerer <schaerer>
Date: Tue, 19 Oct 2010 13:08:05 +0000
Subject: [PATCH] space-proofness

---
 fast_make.sh |  6 ++++--
 make_meta.sh | 12 ++++++------
 2 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/fast_make.sh b/fast_make.sh
index 7a11e0a..8de13fc 100755
--- a/fast_make.sh
+++ b/fast_make.sh
@@ -1,7 +1,9 @@
 #!/bin/bash
-vv_dir=$(dirname $(readlink -e $(which $0)))
+temp=$(which "$0")
+temp=$(readlink -e "${temp}")
+vv_dir=$(dirname "${temp}")
 echo clitk3 directory: $vv_dir
-cd ${vv_dir}/build
+cd "${vv_dir}/build"
 
 
 function handle_exit
diff --git a/make_meta.sh b/make_meta.sh
index 29a496e..a1da280 100755
--- a/make_meta.sh
+++ b/make_meta.sh
@@ -1,18 +1,18 @@
 #!/bin/bash
 #This script creates the files necessary for developement: vim tags files, doxygen documentation, ...
-ROOT_DIR=$(pwd)
+ROOT_DIR="$(pwd)"
 echo $ROOT_DIR
 #ROOT_DIR=${HOME}/workspace/vv
-cd ${ROOT_DIR}
+cd "${ROOT_DIR}"
 [ "$1" = "--full" ] && doxygen clitk.doxygen&
 
-for i in $(find $(pwd) -type d | grep -v "^\.$")
+find "$(pwd)" -type d | grep -v "^\.$" | while read i
 do
-    cd $i && [ -n "$(find . -maxdepth 1 -name '*.c??')" ] &&
+    cd "$i" && [ -n "$(find . -maxdepth 1 -name '*.c??')" ] &&
     {
         rm .vimrc
-        ln -s ${ROOT_DIR}/.vimrc .
-        ctags -R --languages=c,c++ --exclude=build --langmap=c++:.c++.cc.cp.cpp.cxx.h.h++.hh.hp.hpp.hxx.C.H.txx --exclude=doc --exclude=tests_jef ${ROOT_DIR} &
+        ln -s "${ROOT_DIR}/.vimrc" .
+        ctags -R --languages=c,c++ --exclude=build --langmap=c++:.c++.cc.cp.cpp.cxx.h.h++.hh.hp.hpp.hxx.C.H.txx --exclude=doc --exclude=tests_jef "${ROOT_DIR}" &
     }
 done
 wait
-- 
2.49.0