home
·
contact
·
privacy
projects
/
redo-blog
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4c034ef
)
Fix buggy add_dir script.
author
Christian Heller
<c.heller@plomlompom.de>
Wed, 25 Jan 2017 01:47:30 +0000
(
02:47
+0100)
committer
Christian Heller
<c.heller@plomlompom.de>
Wed, 25 Jan 2017 01:47:30 +0000
(
02:47
+0100)
add_dir.sh
patch
|
blob
|
history
diff --git
a/add_dir.sh
b/add_dir.sh
index b8e04bd9a9c3d6b5d124fb1f8182ee2e80a382a4..14d2c7a99acbc5e637e1e31043fd2f2d3cf39c59 100755
(executable)
--- a/
add_dir.sh
+++ b/
add_dir.sh
@@
-3,8
+3,8
@@
set -e
link_files_in_dir () {
set -e
link_files_in_dir () {
-
src
dir="$1"
- for file in "$
srcdir"/* "$src
dir"/.*; do
+
local parent_
dir="$1"
+ for file in "$
parent_dir"/* "$parent_
dir"/.*; do
if [ -f "$file" ]; then
set +e
ln -s "$file"
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"
dir=$(basename "$file")
mkdir -p "$dir"
cd "$dir"
- link_files_in_dir "$
src
dir/$dir"
+ link_files_in_dir "$
parent_
dir/$dir"
cd ..
fi
done
}
cd ..
fi
done
}
-srcdir=`pwd`/processor
+src
_
dir=`pwd`/processor
mkdir -p "$1"
cd "$1"
mkdir -p "$1"
cd "$1"
-link_files_in_dir "$srcdir"
+link_files_in_dir "$src
_
dir"