Skip to content
This repository was archived by the owner on Nov 19, 2022. It is now read-only.

Commit fc482de

Browse files
authored
Merge pull request #12 from soburi/west_wrapper
Run west command on initialized directory
2 parents 62f819c + a956c58 commit fc482de

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

system/support/west_wrap.sh

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
11
#!/bin/bash
2-
cd `dirname $0`
2+
3+
PREV=$0
4+
ZBASE=${ZEPHYR_BASE}
5+
ERR=0
6+
7+
for ARG in $*; do
8+
if [ "$PREV" == "-z" ] ; then
9+
ZBASE=$ARG
10+
fi
11+
PREV=$ARG
12+
done
13+
14+
pushd "$ZBASE"
315
west $*
16+
ERR=$?
17+
popd >/dev/null
18+
19+
exit $ERR

0 commit comments

Comments
 (0)