s_l.sh 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # This file is part of Tabannusi, a continuous build system.
  2. # Copyright (c) 2016 ali abdul ghani <alimiracle@riseup.net>
  3. # Tabannusi is free software: you can redistribute it and/or modify
  4. # it under the terms of the GNU General Public License as published by
  5. # the Free Software Foundation, either version 3 of the License, or
  6. # (at your option) any later version.
  7. # Tabannusi is distributed in the hope that it will be useful,
  8. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. # GNU General Public License for more details.
  11. # You should have received a copy of the GNU General Public License
  12. # along with Tabannusi. If not, see <http://www.gnu.org/licenses/>.
  13. mkdir bin
  14. mkdir bin/tmp
  15. cp *.sh bin
  16. cp tabannusi.c bin
  17. cd bin
  18. awk '{gsub("source /etc/tabannusi/config.sh", "source config.sh");print}' run.sh >file.txt
  19. cat file.txt>run.sh
  20. awk '{gsub("/etc/tabannusi/build.sh", "$dir/build.sh");print}' run.sh >file.txt
  21. cat file.txt >run.sh
  22. awk '{gsub("/etc/tabannusi/make.sh", "$dir/make.sh");print}' build.sh >file.txt
  23. cat file.txt>build.sh
  24. awk '{gsub("source /etc/tabannusi/config.sh", "source config.sh");print}' make.sh >file.txt
  25. cat file.txt >make.sh
  26. awk '{gsub("/bin/", "");print}' tabannusi.c >file.txt
  27. cat file.txt>tabannusi.c
  28. awk '{gsub("chdir", "// ");print}' tabannusi.c >file.txt
  29. cat file.txt>tabannusi.c
  30. awk '{gsub("/tmp", "tmp");print}' tabannusi.c >file.txt
  31. cat file.txt>tabannusi.c
  32. awk '{gsub("/var/run/", "");print}' tabannusi.c >file.txt
  33. cat file.txt>tabannusi.c
  34. awk '{gsub("/tmp", "`pwd`/tmp");print}' config.sh >file.txt
  35. cat file.txt >config.sh
  36. rm file.txt
  37. gcc -g -Wall -o tabannusi tabannusi.c -lpthread
  38. rm tabannusi.c
  39. chmod +x *.*
  40. chmod +x tabbannusi