Mercurial > hg > toybox
annotate scripts/single.sh @ 1670:31dded5e0e09 draft
bootchartd: Removing wrong free call to non-malloc'ed string.
author | Luis Felipe Strano Moraes <luis.strano@gmail.com> |
---|---|
date | Thu, 22 Jan 2015 16:29:34 -0600 |
parents | 448e47e2ad46 |
children | 543bee60af4c |
rev | line source |
---|---|
1032
40d0c96a8e89
Add scripts/single.sh to build individual non-multiplexed standalone commands.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
1 #!/bin/bash |
40d0c96a8e89
Add scripts/single.sh to build individual non-multiplexed standalone commands.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
2 |
40d0c96a8e89
Add scripts/single.sh to build individual non-multiplexed standalone commands.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
3 # Build a standalone toybox command |
40d0c96a8e89
Add scripts/single.sh to build individual non-multiplexed standalone commands.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
4 |
40d0c96a8e89
Add scripts/single.sh to build individual non-multiplexed standalone commands.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
5 if [ -z "$1" ] |
40d0c96a8e89
Add scripts/single.sh to build individual non-multiplexed standalone commands.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
6 then |
1504
c86e27992c4a
Allow single.sh to build more than one command per invocation.
Rob Landley <rob@landley.net>
parents:
1435
diff
changeset
|
7 echo "usage: single.sh command..." >&2 |
1032
40d0c96a8e89
Add scripts/single.sh to build individual non-multiplexed standalone commands.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
8 exit 1 |
40d0c96a8e89
Add scripts/single.sh to build individual non-multiplexed standalone commands.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
9 fi |
40d0c96a8e89
Add scripts/single.sh to build individual non-multiplexed standalone commands.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
10 |
1504
c86e27992c4a
Allow single.sh to build more than one command per invocation.
Rob Landley <rob@landley.net>
parents:
1435
diff
changeset
|
11 for i in "$@" |
c86e27992c4a
Allow single.sh to build more than one command per invocation.
Rob Landley <rob@landley.net>
parents:
1435
diff
changeset
|
12 do |
c86e27992c4a
Allow single.sh to build more than one command per invocation.
Rob Landley <rob@landley.net>
parents:
1435
diff
changeset
|
13 NAME=$(echo $i | tr a-z- A-Z_) |
c86e27992c4a
Allow single.sh to build more than one command per invocation.
Rob Landley <rob@landley.net>
parents:
1435
diff
changeset
|
14 export KCONFIG_CONFIG=.singleconfig |
c86e27992c4a
Allow single.sh to build more than one command per invocation.
Rob Landley <rob@landley.net>
parents:
1435
diff
changeset
|
15 USET="is not set" |
1032
40d0c96a8e89
Add scripts/single.sh to build individual non-multiplexed standalone commands.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
16 |
1504
c86e27992c4a
Allow single.sh to build more than one command per invocation.
Rob Landley <rob@landley.net>
parents:
1435
diff
changeset
|
17 make allnoconfig > /dev/null && |
c86e27992c4a
Allow single.sh to build more than one command per invocation.
Rob Landley <rob@landley.net>
parents:
1435
diff
changeset
|
18 sed -i -e "s/\(CONFIG_TOYBOX\)=y/# \1 $USET/" \ |
c86e27992c4a
Allow single.sh to build more than one command per invocation.
Rob Landley <rob@landley.net>
parents:
1435
diff
changeset
|
19 -e "s/# \(CONFIG_$NAME\) $USET/\1=y/" \ |
c86e27992c4a
Allow single.sh to build more than one command per invocation.
Rob Landley <rob@landley.net>
parents:
1435
diff
changeset
|
20 -e "s/# \(CONFIG_${NAME}_.*\) $USET/\1=y/" \ |
c86e27992c4a
Allow single.sh to build more than one command per invocation.
Rob Landley <rob@landley.net>
parents:
1435
diff
changeset
|
21 -e "s/# \(CONFIG_TOYBOX_HELP.*\) $USET/\1=y/" \ |
c86e27992c4a
Allow single.sh to build more than one command per invocation.
Rob Landley <rob@landley.net>
parents:
1435
diff
changeset
|
22 -e "s/# \(CONFIG_TOYBOX_I18N\) $USET/\1=y/" \ |
c86e27992c4a
Allow single.sh to build more than one command per invocation.
Rob Landley <rob@landley.net>
parents:
1435
diff
changeset
|
23 -e "s/# \(CONFIG_TOYBOX_FLOAT\) $USET/\1=y/" \ |
c86e27992c4a
Allow single.sh to build more than one command per invocation.
Rob Landley <rob@landley.net>
parents:
1435
diff
changeset
|
24 "$KCONFIG_CONFIG" && |
c86e27992c4a
Allow single.sh to build more than one command per invocation.
Rob Landley <rob@landley.net>
parents:
1435
diff
changeset
|
25 make && |
1506
448e47e2ad46
Multi-build single.sh should exit with an error when build breaks.
Rob Landley <rob@landley.net>
parents:
1504
diff
changeset
|
26 mv toybox $PREFIX$i || exit 1 |
1504
c86e27992c4a
Allow single.sh to build more than one command per invocation.
Rob Landley <rob@landley.net>
parents:
1435
diff
changeset
|
27 done |