File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ RULESDIR = /etc/udev/rules.d
77
88# End of simple config, you shall not pass below
99
10- VERSION = 0.0.2
10+ VERSION = 0.0.2_p1
1111
1212BUILDDIR = build
1313SRCDIR = src
Original file line number Diff line number Diff line change @@ -196,6 +196,16 @@ mp_remove() {
196196 fi
197197}
198198
199+ # Count slashes in arg and increase ${DEPTH} if needed
200+
201+ _mp_countslashes () {
202+ local MP
203+ MP=" $( echo " $1 " | tr -cd /) "
204+ [ ${# MP} -gt ${DEPTH} ] && DEPTH=${# MP}
205+
206+ return 0
207+ }
208+
199209# Calculate -maxdepth for given templates.
200210
201211mp_getmaxdepth () {
@@ -205,15 +215,7 @@ mp_getmaxdepth() {
205215
206216 if ! isint " ${DEPTH} " ; then
207217 DEPTH=0
208- function mp_countslashes() {
209- local MP
210- MP=" $( echo " $1 " | tr -cd /) "
211- [ ${# MP} -gt ${DEPTH} ] && DEPTH=${# MP}
212-
213- return 0
214- }
215-
216- foreach " ${ARR} " mp_countslashes
218+ foreach " ${ARR} " _mp_countslashes
217219 fi
218220
219221 echo $(( DEPTH + 1 ))
You can’t perform that action at this time.
0 commit comments