yursablon.lua 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. -- operation template
  2. -- sıralı bir şekilde yürürlük betiğinin oluşturulması
  3. local yur_content=[==[
  4. #!/bin/sh
  5. # generated by mpsd version 2.0 alfa
  6. @GENTIME@
  7. # TALIMAT FILE SHA256SUM
  8. thash="@THASH@"
  9. TALIMAT_DIZIN="@TALIMAT_DIZIN@"
  10. # IMPORTS
  11. #[ ! -f ./mpsd-helper.sh ] && exit 1;
  12. #source ./mpsd-helper.sh
  13. @FUNCTIONS@
  14. # GLOBAL VARIABLES"
  15. #==========================================
  16. @GLOBALS@
  17. #==========================================
  18. # TALIMAT VARIABLES
  19. #==========================================
  20. tanim="@TANIM@"
  21. url=@URL@
  22. paketci="@PAKETCI@"
  23. grup="@GRUP@"
  24. isim=@ISIM@
  25. surum=@SURUM@
  26. devir=@DEVIR@
  27. #==========================================
  28. # SOURCES
  29. #==========================================
  30. kaynak=(@KAYNAK@)
  31. #==========================================
  32. # FUNCTIONS
  33. #==========================================
  34. #_install_bdeps(){
  35. #echo "GEREKLERIN KURULUMU = ${isim}-${surum}-${devir}"
  36. #echo "======================================================="
  37. #@GEREK_KUR@
  38. #echo "======================================================="
  39. #}
  40. _download_copy(){
  41. echo "KAYNAK İNDİRME-KOPYALAMA = ${isim}-${surum}-${devir}"
  42. echo "======================================================="
  43. @DOWNLOAD@
  44. [ $? -eq 1 ] && hata_olustu "--exit---"
  45. echo "======================================================="
  46. }
  47. _hash_check(){
  48. echo "KAYNAK HASH KONTROL = ${isim}-${surum}-${devir}"
  49. echo "======================================================="
  50. @HASH_CHECK@
  51. echo "======================================================="
  52. }
  53. _extract(){
  54. echo "DIŞARI ÇIKARMA = ${isim}-${surum}-${devir}"
  55. echo "---------"
  56. time_start
  57. echo "======================================================="
  58. rm -f $SRC/arsiv.list
  59. @EXTRACT@
  60. echo "======================================================="
  61. time_finish
  62. echo "======================================================="
  63. }
  64. _build(){
  65. [ ! -d $SRC ] && hata_olustu "$SRC dizin mevcut değil!"
  66. echo "DERLEME = ${isim}-${surum}-${devir}"
  67. echo "---------"
  68. time_start
  69. echo "======================================================="
  70. trap 'hata_olustu "derleme hata/building step error"' ERR
  71. cd $SRC
  72. set -x
  73. [ -d ${isim}-${surum} ] && cd $SRC/${isim}-${surum}
  74. @DERLE@
  75. set +x
  76. echo "======================================================="
  77. time_finish
  78. echo "======================================================="
  79. }
  80. _install(){
  81. [ ! -d $PKG ] && hata_olustu "$PKG dizin mevcut değil!"
  82. echo "PAKETLEME = ${isim}-${surum}-${devir}"
  83. echo "---------"
  84. time_start
  85. echo "======================================================="
  86. trap 'hata_olustu "pakur hata/installing step error"' ERR
  87. cd $SRC
  88. set -x
  89. [ -d ${isim}-${surum} ] && cd $SRC/${isim}-${surum}
  90. @PAKUR@
  91. set +x
  92. echo "======================================================="
  93. time_finish
  94. echo "======================================================="
  95. }
  96. # LOG FILES
  97. BUILD_LOG=/tmp/$isim-$surum-$devir.build.log
  98. INSTALL_LOG=/tmp/$isim-$surum-$devir.install.log
  99. _LOG=/tmp/$isim-$surum-$devir.log
  100. run $1
  101. ]==]
  102. return yur_content;