summaryrefslogtreecommitdiff
path: root/scripts/create-busybox.sh
blob: 7dc1c13bb2a192733b432046dfcb24e0f932ad51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash

cd $1
for i in $(find . -name Config.in);
do
 cp --parents $i ../package/busybox/config/
done
cd ..
cd package/busybox/config
for i in $(find . -name Config.in);
do
 sed -i -e 's/^mainmenu \(.*\)/# mainmenu \1/' $i
 sed -i -e 's/^config \(.*\)/config BUSYBOX_\1/' $i
 sed -i -e 's/^	select \([:upper:]*\)/	select BUSYBOX_\1/' $i
 sed -i -e 's/depends on !\([:upper:]*\)/depends on !BUSYBOX_\1/' $i
 sed -i -e 's/depends on (\([:upper:]*\)/depends on (BUSYBOX_\1/' $i
 sed -i -e 's/depends on \([^!(][:upper:]*\)/depends on BUSYBOX_\1/' $i
 sed -i -e 's/&& (\([:upper:]*\)/\&\& (BUSYBOX_\1/' $i
 sed -i -e 's/&& !\([:upper:]*\)/\&\& !BUSYBOX_\1/g' $i
 sed -i -e 's/&& \([^!(][:upper:]*\)/\&\& BUSYBOX_\1/g' $i
 sed -i -e 's/|| !\([:upper:]*\)/|| !BUSYBOX_\1/g' $i
 sed -i -e 's/|| \([^!(][:upper:]*\)/|| BUSYBOX_\1/g' $i
 sed -i -e 's#^source \(.*\)#source package/busybox/config/\1#' $i
 sed -i -e 's/BUSYBOX_ \([:upper:]*\)/BUSYBOX_\1/' $i
done