File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,11 +10,31 @@ if [[ "$#" -eq 0 ]]; then
1010 echo " Package parameter is missing"
1111fi
1212
13- for i in $( ls config/distro) ; do
14- # source config
15- . config/distro/$i
16-
17- (cd $DISTRO
18- PROJECT=$PROJECT ARCH=$ARCH DEVICE=$DEVICE scripts/clean $1 || true
19- )
13+ while [[ " $# " -gt 0 ]]; do
14+ case $1 in
15+ -config) shift ; CONFIG=$1 ;;
16+ * ) PACKAGE=$1 ;;
17+ esac
18+ shift || continue
2019done
20+
21+ if [ -n " $CONFIG " ]; then
22+ # only clean one config
23+ . config/distro/$CONFIG
24+
25+ (cd $DISTRO
26+ PROJECT=$PROJECT ARCH=$ARCH DEVICE=$DEVICE scripts/clean $PACKAGE || true
27+ )
28+
29+ else
30+ # clean all
31+ for i in $( ls config/distro) ; do
32+ echo " DISTRO: $i "
33+ # source config
34+ . config/distro/$i
35+
36+ (cd $DISTRO
37+ PROJECT=$PROJECT ARCH=$ARCH DEVICE=$DEVICE scripts/clean $PACKAGE || true
38+ )
39+ done
40+ fi
You can’t perform that action at this time.
0 commit comments