source.sh 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. file_path=/etc/bash_completion.d/xrnlib-cli-autocomplete.sh
  2. if [ -e "$file_path" ]; then
  3. echo "source $file_path"
  4. source $file_path
  5. fi
  6. file_path=/etc/bash_completion.d/xrnconv-cli-autocomplete.sh
  7. if [ -e "$file_path" ]; then
  8. echo "source $file_path"
  9. source $file_path
  10. fi
  11. file_path=/etc/bash_completion.d/xrnarchive-cli-autocomplete.sh
  12. if [ -e "$file_path" ]; then
  13. echo "source $file_path"
  14. source $file_path
  15. fi
  16. file_path=/etc/bash_completion.d/xrnserver-cli-autocomplete.sh
  17. if [ -e "$file_path" ]; then
  18. echo "source $file_path"
  19. source $file_path
  20. fi
  21. file_path1=/usr/lib/xoronos/py/_xrnlib128.so
  22. file_path2=/usr/lib/xoronos/py/xrnlib128.py
  23. file_path3=/usr/lib/xoronos/py/_xrnlib256.so
  24. file_path4=/usr/lib/xoronos/py/xrnlib256.py
  25. file_path5=/usr/lib/xoronos/py/splitjoin.cpython*
  26. if [ -e "$file_path1" ] || [ -e "$file_path2" ] || [ -e "$file_path3" ] || [ -e "$file_path4" ] || [ -e "$file_path5" ]; then
  27. if [[ "$PYTHONPATH" != *"/usr/lib/xoronos/py"* ]] ; then
  28. if [ "$PYTHONPATH" == "" ] ; then
  29. cmd="export PYTHONPATH=/usr/lib/xoronos/py"
  30. echo "$cmd" ; eval "$cmd"
  31. else
  32. cmd="export PYTHONPATH=/usr/lib/xoronos/py:$PYTHONPATH"
  33. echo "$cmd" ; eval "$cmd"
  34. fi
  35. fi
  36. fi
  37. file_path1=/usr/lib/xoronos/xrnlib-128.so
  38. file_path2=/usr/lib/xoronos/xrnlib-256.so
  39. file_path3=/usr/lib/xoronos/xrnlib-128.a
  40. file_path4=/usr/lib/xoronos/xrnlib-256.a
  41. if [ -e "$file_path1" ] || [ -e "$file_path2" ] || [ -e "$file_path3" ] || [ -e "$file_path4" ]; then
  42. if [[ "$LD_LIBRARY_PATH" != *"/usr/lib/xoronos"* ]] ; then
  43. if [ "$LD_LIBRARY_PATH" == "" ] ; then
  44. cmd="export LD_LIBRARY_PATH=/usr/lib/xoronos"
  45. echo "$cmd" ; eval "$cmd"
  46. else
  47. cmd="export LD_LIBRARY_PATH=/usr/lib/xoronos:$LD_LIBRARY_PATH"
  48. echo "$cmd" ; eval "$cmd"
  49. fi
  50. fi
  51. fi
  52. dir_path=$HOME/.local/xoronos/texmf
  53. if [ -d "$dir_path" ] ; then
  54. if [[ "$TEXMFHOME" != *"$HOME/.local/xoronos/texmf"* ]] ; then
  55. if [ "$TEXMFHOME" == "" ] ; then
  56. cmd="export TEXMFHOME=$HOME/.local/xoronos/texmf"
  57. echo "$cmd" ; eval "$cmd"
  58. export TEXMFHOME
  59. else
  60. cmd="export TEXMFHOME=$HOME/.local/xoronos/texmf:$TEXMFHOME"
  61. echo "$cmd" ; eval "$cmd"
  62. export TEXMFHOME
  63. fi
  64. fi
  65. fi