initialize_host.sh 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. #!/bin/bash
  2. if [ ! -d ../archives/resources ] ; then
  3. cmd="cd ../archives ; tar -xzf resources.tar.gz resources "
  4. echo "$cmd" ; eval "$cmd"
  5. fi
  6. if [ ! -d ../archives/prebuilt-docs ] ; then
  7. cmd="cd ../prebuilt-docs ; tar -xzf prebuilt-docs.tar.gz prebuilt-docs "
  8. echo "$cmd" ; eval "$cmd"
  9. fi
  10. # copy steganography data
  11. if [ ! -f ../code/lib/xrn_steganography/inc/steg_data.h ] ; then
  12. cmd="cp ../archives/resources/steg_header/steg_data.h ../code/lib/xrn_steganography/inc/"
  13. echo "$cmd" ; eval "$cmd"
  14. fi
  15. # make directories
  16. if [ ! -d $HOME/.local ] ; then
  17. cmd="mkdir $HOME/.local"
  18. echo "$cmd" ; eval "$cmd"
  19. fi
  20. if [ ! -d $HOME/.local/xoronos ] ; then
  21. cmd="mkdir $HOME/.local/xoronos"
  22. echo "$cmd" ; eval "$cmd"
  23. fi
  24. if [ ! -d $HOME/.local/xoronos/texmf ] ; then
  25. cmd="mkdir $HOME/.local/xoronos/texmf"
  26. echo "$cmd" ; eval "$cmd"
  27. fi
  28. if [ ! -d $HOME/.local/xoronos/cache/ ] ; then
  29. cmd="mkdir $HOME/.local/xoronos/cache/"
  30. echo "$cmd" ; eval "$cmd"
  31. fi
  32. if [ ! -d $HOME/.local/xoronos/texmf/tex ] ; then
  33. cmd="mkdir $HOME/.local/xoronos/texmf/tex"
  34. echo "$cmd" ; eval "$cmd"
  35. fi
  36. if [ ! -d $HOME/.local/xoronos/resources ] ; then
  37. cmd="mkdir $HOME/.local/xoronos/resources"
  38. echo "$cmd" ; eval "$cmd"
  39. fi
  40. if [ ! -d $HOME/.cache ] ; then
  41. cmd="mkdir $HOME/.cache"
  42. echo "$cmd" ; eval "$cmd"
  43. fi
  44. if [ ! -d $HOME/.cache/xoronos ] ; then
  45. cmd="mkdir $HOME/.cache/xoronos"
  46. echo "$cmd" ; eval "$cmd"
  47. fi
  48. if [ ! -d $HOME/.local/xoronos/resources/sample_files ] ; then
  49. cmd="mkdir $HOME/.local/xoronos/resources/sample_files"
  50. echo "$cmd" ; eval "$cmd"
  51. fi
  52. # copy from resources
  53. cmd="cp -r ../archives/resources/miscellaneus/tex/* $HOME/.local/xoronos/texmf/tex"
  54. echo "$cmd" ; eval "$cmd"
  55. cmd="cp ../archives/resources/code_examples/lorem_ipsum.txt $HOME/.local/xoronos/resources/plain_text.txt"
  56. echo "$cmd" ; eval "$cmd"
  57. cmd="cp -r ../archives/resources/sample_files/* $HOME/.local/xoronos/resources/sample_files/"
  58. echo "$cmd" ; eval "$cmd"