You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.3 KiB

5 years ago
  1. #!/bin/sh
  2. # Don't use! :)
  3. #
  4. # Sat, 03 May 2003 16:45:08 Modifications from J�rg Weule <weule@7b5.de>
  5. # Create a ed-cmd for the change of one pattern
  6. #
  7. case $1 in
  8. gnu) X=g/javax_comm/s+javax_comm+gnu_io+g ;;
  9. javax) X=g/gnu_io/s+gnu_io+javax_comm+g ;;
  10. *) echo;echo;echo From the top rxtx directory run;echo;echo -e \\t./ChangePackage.sh gnu;echo -e \\t\\tor;echo -e \\t./ChangePackage.sh javax;echo;echo; exit 0 ;;
  11. esac
  12. #
  13. # ed will be used to keep the owner and mode of the files unchanged.
  14. # We have run the ed-script for the characters '.' '/' as well.
  15. # "tr _ $D" do the change.
  16. #
  17. find . -type f -a -print |
  18. grep -v $0 |
  19. (while read F ; do
  20. ( echo $X;
  21. echo $X| tr _ /;
  22. echo $X| tr _ .;
  23. echo w;
  24. echo q
  25. ) | ed $F 2>&1 >/dev/null
  26. done )
  27. #
  28. # Now we do little changes at the Makefiles. Hope that all we need.
  29. #
  30. find . -name Makefile\* -a -print |
  31. (while read F ; do cat <<EOF | ed $F
  32. g/RXTXcomm.jar gnu/s/RXTXcomm.jar gnu/RXTXcomm.jar javax/g
  33. g/CLASSTOP=gnu/s/gnu/javax/g
  34. g/CLASSTOP = gnu/s/gnu/javax/g
  35. g/gnu\\\\\\\\io/s/gnu\\\\\\\\io/javax\\\\\\\\comm/g
  36. g/gnu\\\\\\\\\\\\io/s/gnu\\\\\\\\\\\\io/javax\\\\\\\\\\\\comm/g
  37. g/mkdir gnu/s/mkdir gnu/makedir javax/g
  38. g/include gnu/s/include gnu/include javax/g
  39. g/gnu include/s/gnu include/javax include/g
  40. w
  41. q
  42. EOF
  43. done)