install.sh 673 B

123456789101112131415161718192021222324
  1. #!/usr/bin/env bash
  2. # Default the folder name
  3. folderName="Slack Templates"
  4. # Determine the source directory.
  5. sourceDirectory=`dirname "$BASH_SOURCE"`
  6. # Determine the install directory.
  7. installDirectory=~/Library/Developer/Xcode/Templates/File\ Templates/"$folderName"
  8. echo "Templates will be installed to $installDirectory"
  9. # Delete the install directory if it already exists to prevent deleted files from lingering.
  10. if [ -d "$installDirectory" ]
  11. then
  12. rm -r "$installDirectory"
  13. fi
  14. # Create the install directory.
  15. mkdir -p "$installDirectory"
  16. # Copy all of the xctemplate folders into the install directory.
  17. cp -r "$sourceDirectory"/*.xctemplate "$installDirectory"