PageRenderTime 22ms CodeModel.GetById 13ms app.highlight 4ms RepoModel.GetById 2ms app.codeStats 0ms

/sdk-installer/src/main/osx/scripts/postinstall

https://bitbucket.org/mmeinhold/amps
Shell | 18 lines | 11 code | 3 blank | 4 comment | 2 complexity | 7261bcbb152f7caff57991f88dce9ac7 MD5 | raw file
 1#!/bin/sh
 2
 3# remove any previous symlinks from /usr/local/bin
 4for f in `find /usr/local/bin/ -name "atlas-*"`; do
 5  rm $f
 6done
 7    
 8# set correct perms
 9chown -R root:staff /usr/share/atlassian-plugin-sdk-${version}
10chmod -R 755 /usr/share/atlassian-plugin-sdk-${version}/bin
11chmod -R 755 /usr/share/atlassian-plugin-sdk-${version}/apache-maven/bin
12chmod 755 /usr/share/atlassian-plugin-sdk-${version}/uninstall.sh
13
14# Add the symlinks we need from /usr/share to /usr/local/bin
15for f in `find /usr/share/atlassian-plugin-sdk-${version}/bin/ -name "atlas-*" | xargs -n1 basename`; do
16  ln -s /usr/share/atlassian-plugin-sdk-${version}/bin/$f /usr/local/bin/$f
17  chown -R root:staff /usr/local/bin/$f
18done