iterate_hex_to_pasteboard.sh 540 B

12345678910111213141516
  1. #!/usr/bin/bash
  2. # I use this script to loop over the contents of each text file
  3. # produced by images_to_hex.sh and copy it to the clipboard.
  4. # This makes adding or updating graphics to the project faster.
  5. #
  6. # You can edit the $folder variable below to work in a certain
  7. # subdirectory, and you can edit the wildcard expression below
  8. # to only work with a certain image size, like "*@3x.txt"
  9. folder=.
  10. for file in `find $folder -type f -name "*.txt"`; do
  11. cat $file | pbcopy
  12. read -p "Copied $file, press any key to continue..."
  13. done