create-busybox.sh 959 B

12345678910111213141516171819202122232425
  1. #!/bin/bash
  2. cd $1
  3. for i in $(find . -name Config.in);
  4. do
  5. cp --parents $i ../package/busybox/config/
  6. done
  7. cd ..
  8. cd package/busybox/config
  9. for i in $(find . -name Config.in);
  10. do
  11. sed -i -e 's/^mainmenu \(.*\)/# mainmenu \1/' $i
  12. sed -i -e 's/^config \(.*\)/config BUSYBOX_\1/' $i
  13. sed -i -e 's/^ select \([:upper:]*\)/ select BUSYBOX_\1/' $i
  14. sed -i -e 's/depends on !\([:upper:]*\)/depends on !BUSYBOX_\1/' $i
  15. sed -i -e 's/depends on (\([:upper:]*\)/depends on (BUSYBOX_\1/' $i
  16. sed -i -e 's/depends on \([^!(][:upper:]*\)/depends on BUSYBOX_\1/' $i
  17. sed -i -e 's/&& (\([:upper:]*\)/\&\& (BUSYBOX_\1/' $i
  18. sed -i -e 's/&& !\([:upper:]*\)/\&\& !BUSYBOX_\1/g' $i
  19. sed -i -e 's/&& \([^!(][:upper:]*\)/\&\& BUSYBOX_\1/g' $i
  20. sed -i -e 's/|| !\([:upper:]*\)/|| !BUSYBOX_\1/g' $i
  21. sed -i -e 's/|| \([^!(][:upper:]*\)/|| BUSYBOX_\1/g' $i
  22. sed -i -e 's#^source \(.*\)#source package/busybox/config/\1#' $i
  23. sed -i -e 's/BUSYBOX_ \([:upper:]*\)/BUSYBOX_\1/' $i
  24. done