install.sh 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. #!/bin/bash
  2. privilege_escalation="sudo "
  3. if [ ! -d "/usr/lib/xoronos" ]; then
  4. cmd="$privilege_escalation mkdir /usr/lib/xoronos"
  5. echo "$cmd" ; eval "$cmd"
  6. fi
  7. if [ ! -d "/usr/lib/xoronos/py" ]; then
  8. cmd="$privilege_escalation mkdir /usr/lib/xoronos/py"
  9. echo "$cmd" ; eval "$cmd"
  10. fi
  11. file_path=./auxiliary_tools/xrnconv-cli
  12. if [ -e "$file_path" ]; then
  13. cmd="$privilege_escalation cp $file_path /usr/local/bin"
  14. echo "$cmd" ; eval "$cmd"
  15. fi
  16. file_path=./auxiliary_tools/xrnserver-cli
  17. if [ -e "$file_path" ]; then
  18. cmd="$privilege_escalation cp $file_path /usr/local/bin"
  19. echo "$cmd" ; eval "$cmd"
  20. fi
  21. file_path=./auxiliary_tools/xrnarchive-cli
  22. if [ -e "$file_path" ]; then
  23. cmd="$privilege_escalation cp $file_path /usr/local/bin"
  24. echo "$cmd" ; eval "$cmd"
  25. fi
  26. file_path=./auxiliary_tools/xrntranslate-cli
  27. if [ -e "$file_path" ]; then
  28. cmd="$privilege_escalation cp $file_path /usr/local/bin"
  29. echo "$cmd" ; eval "$cmd"
  30. fi
  31. file_path=./auxiliary_tools/xrngen-cli
  32. if [ -e "$file_path" ]; then
  33. cmd="$privilege_escalation cp $file_path /usr/local/bin"
  34. echo "$cmd" ; eval "$cmd"
  35. fi
  36. file_path=../build/bin/xrnlib-cli
  37. if [ -e "$file_path" ]; then
  38. cmd="$privilege_escalation cp $file_path /usr/local/bin"
  39. echo "$cmd" ; eval "$cmd"
  40. fi
  41. file_path=../build/bin/xrnlib-128-cli
  42. if [ -e "$file_path" ]; then
  43. cmd="$privilege_escalation cp $file_path /usr/local/bin"
  44. echo "$cmd" ; eval "$cmd"
  45. fi
  46. file_path=../build/bin/xrnlib-256-cli
  47. if [ -e "$file_path" ]; then
  48. cmd="$privilege_escalation cp $file_path /usr/local/bin"
  49. echo "$cmd" ; eval "$cmd"
  50. fi
  51. file_path=../build/sharedlib/xrnlib-128.so
  52. if [ -e "$file_path" ]; then
  53. cmd="$privilege_escalation cp $file_path /usr/lib/xoronos"
  54. echo "$cmd" ; eval "$cmd"
  55. fi
  56. file_path=../build/sharedlib/xrnlib-256.so
  57. if [ -e "$file_path" ]; then
  58. cmd="$privilege_escalation cp $file_path /usr/lib/xoronos"
  59. echo "$cmd" ; eval "$cmd"
  60. fi
  61. file_path=./backend/xrnserver-cli-autocomplete.sh
  62. if [ -e "$file_path" ]; then
  63. cmd="$privilege_escalation cp $file_path /etc/bash_completion.d"
  64. echo "$cmd" ; eval "$cmd"
  65. fi
  66. file_path=./backend/xrnarchive-cli-autocomplete.sh
  67. if [ -e "$file_path" ]; then
  68. cmd="$privilege_escalation cp $file_path /etc/bash_completion.d"
  69. echo "$cmd" ; eval "$cmd"
  70. fi
  71. file_path=./backend/xrnlib-cli-autocomplete.sh
  72. if [ -e "$file_path" ]; then
  73. cmd="$privilege_escalation cp $file_path /etc/bash_completion.d"
  74. echo "$cmd" ; eval "$cmd"
  75. fi
  76. file_path=./backend/xrnconv-cli-autocomplete.sh
  77. if [ -e "$file_path" ]; then
  78. cmd="$privilege_escalation cp $file_path /etc/bash_completion.d"
  79. echo "$cmd" ; eval "$cmd"
  80. fi
  81. file_path=./backend/xrngen-cli-automplete.sh
  82. if [ -e "$file_path" ]; then
  83. cmd="$privilege_escalation cp $file_path /etc/bash_completion.d"
  84. echo "$cmd" ; eval "$cmd"
  85. fi
  86. file_path1=../build/py/_xrnlib256.so
  87. file_path2=../build/py/xrnlib256.py
  88. if [ -e "$file_path1" ] && [ -e "$file_path2" ]; then
  89. cmd="$privilege_escalation cp $file_path1 $file_path2 /usr/lib/xoronos/py"
  90. echo "$cmd" ; eval "$cmd"
  91. fi
  92. file_path1=../build/py/_xrnlib128.so
  93. file_path2=../build/py/xrnlib128.py
  94. if [ -e "$file_path1" ] && [ -e "$file_path2" ]; then
  95. cmd="$privilege_escalation cp $file_path1 $file_path2 /usr/lib/xoronos/py"
  96. echo "$cmd" ; eval "$cmd"
  97. fi
  98. file_path1=./source.sh
  99. if [ -e "$file_path1" ] ; then
  100. cmd="cp $file_path1 $HOME/.local/xoronos"
  101. echo "$cmd" ; eval "$cmd"
  102. fi
  103. file_path1=./unsource.sh
  104. if [ -e "$file_path1" ] ; then
  105. cmd="cp $file_path1 $HOME/.local/xoronos"
  106. echo "$cmd" ; eval "$cmd"
  107. fi
  108. file_path1=../archives/resources/miscellaneus/xoronos.tex
  109. if [ -e "$file_path1" ] ; then
  110. if [ -d /usr/share/pandoc/data/templates ] ; then
  111. cmd="$privilege_escalation cp $file_path1 /usr/share/pandoc/data/templates"
  112. echo "$cmd" ; eval "$cmd"
  113. fi
  114. fi
  115. file_path=../build/py/splitjoin.cpython*
  116. if [ -e $file_path ] ; then
  117. cmd="$privilege_escalation cp $file_path /usr/lib/xoronos/py"
  118. echo "$cmd" ; eval "$cmd"
  119. fi
  120. file_path1=../archives/resources/miscellaneus/xoronos.tex
  121. if [ -e "$file_path1" ] ; then
  122. if [ -d /usr/share/pandoc/data/templates ] ; then
  123. cmd="$privilege_escalation cp $file_path1 /usr/share/pandoc/data/templates"
  124. echo "$cmd" ; eval "$cmd"
  125. fi
  126. fi
  127. file_path1=./backend/xrntools_description.json
  128. if [ -e "$file_path1" ] ; then
  129. if [ -d /usr/lib/xoronos/py ] ; then
  130. cmd="$privilege_escalation cp $file_path1 /usr/lib/xoronos/py"
  131. echo "$cmd" ; eval "$cmd"
  132. fi
  133. fi