adamchilcott

airwatch_deploy_-_endnote.sh

Oct 18th, 2017
319
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.03 KB | None | 0 0
  1. #!/usr/bin/env bash
  2.  
  3. #####################################
  4. # Thompson Reuters EndNote X8 For Mac
  5. #####################################
  6.  
  7. #PATH=/usr/gnu/bin:/usr/local/bin:/bin:/usr/bin:.
  8. PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
  9.  
  10. declare zipLocation='/tmp/AirWatch/'
  11. declare zipName='EndNote.zip'
  12.  
  13. ########################
  14. # Pre-Installation Tasks
  15. ########################
  16. rm -R -f "/Applications/EndNote X8"
  17.  
  18. ###############
  19. # Extract *.zip
  20. ###############
  21. bsdtar -x -f "$zipLocation$zipName" -C /tmp/AirWatch
  22.  
  23. ######################
  24. # Copy / Install *.app
  25. ######################
  26. cp -R -f "/tmp/AirWatch/EndNote X8" "/Applications"
  27. chown -R -f root:wheel "/Applications/EndNote X8"
  28. chmod -R -f 775 "/Applications/EndNote X8"
  29. chmod -R -f +x "/Applications/EndNote X8"
  30. chmod -R -f 555 "/Applications/EndNote X8/.license.dat"
  31.  
  32. #########################
  33. # Post-Installation Tasks
  34. #########################
  35. rm -R -f "/tmp/AirWatch"
  36.  
  37. #############
  38. # START NOTES
  39. #############
  40.  
  41. ## Run as command in AirWatch with:
  42. ## sh /tmp/AirWatch/endnoteX8.airwatch > /tmp/airwatch.log 2>&1
  43. ##
  44. ## OR
  45. ##
  46. ## sh /tmp/AirWatch/endnoteX8.airwatch &> /tmp/airwatch.log
  47.  
  48. ## Reference:
  49. ## <https://derflounder.wordpress.com/2016/11/23/deploying-and-licensing-endnote-x8/>
  50. ## <https://derflounder.wordpress.com/2016/11/15/preparing-endnote-x8-for-deployment-using-autopkg/>
  51.  
  52. # 2-clause license ("Simplified BSD License" or "FreeBSD License")
  53. #
  54. # Copyright © 2018, Adam Brian Chilcott
  55. # All rights reserved.
  56. #
  57. # Redistribution and use in source and binary forms, with or without
  58. # modification, are permitted provided that the following conditions are met:
  59. #
  60. # 1. Redistributions of source code must retain the above copyright notice, this
  61. # list of conditions and the following disclaimer.
  62. # 2. Redistributions in binary form must reproduce the above copyright notice,
  63. # this list of conditions and the following disclaimer in the documentation
  64. # and/or other materials provided with the distribution.
  65. #
  66. # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
  67. # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  68. # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  69. # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
  70. # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  71. # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  72. # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  73. # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  74. # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  75. # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  76. #
  77. # The views and conclusions contained in the software and documentation are those
  78. # of the authors and should not be interpreted as representing official policies,
  79. # either expressed or implied, of the FreeBSD Project.
  80.  
  81. ###########
  82. # END NOTES
  83. ###########
Add Comment
Please, Sign In to add comment