PageRenderTime 47ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/BlogEngine/BlogEngine.NET/setup/Mono/mono_setup.sh

#
Shell | 45 lines | 25 code | 6 blank | 14 comment | 2 complexity | a98823710f6009e539cc300449017745 MD5 | raw file
Possible License(s): LGPL-2.1, Apache-2.0, BSD-3-Clause
  1. #!/bin/bash
  2. ##
  3. ## BlogEngine.NET Mono Setup Script
  4. ##
  5. ## This script will prepare a Mono installation of BlogEngine.NET. See the
  6. ## ReadMe.txt file in the same directory for instructions on how to use it and
  7. ## what it does.
  8. ##
  9. ## Usage:
  10. ## ./mono_setup.sh [group_name]
  11. ##
  12. ## Step 1 - Create the symlink
  13. echo "Creating symlink (bin -> Bin)..."
  14. cd ../..
  15. if [ -e bin ]; then
  16. echo "bin already exists - nothing done"
  17. else
  18. ln -s Bin bin
  19. echo "Done!"
  20. fi
  21. echo
  22. if [ -z $1 ]; then
  23. ## No group, no changed permissions...
  24. echo "No group specified; permissions on App_Data were NOT changed"
  25. echo
  26. echo "BlogEngine.NET Mono setup completed"
  27. cd setup/Mono
  28. exit 0
  29. fi
  30. ## Step 2 - change the group of App_Data
  31. echo "Changing App_Data to group $1..."
  32. chgrp -R $1 App_Data
  33. echo "Assigned group write permissions to App_Data..."
  34. chmod -R g+w App_Data
  35. echo "Done!"
  36. echo
  37. echo "BlogEngine.NET Mono setup completed"
  38. cd setup/Mono
  39. exit 0