Created
June 4, 2017 23:01
-
-
Save rsms/a175cdb9f308aec26f4a476689937249 to your computer and use it in GitHub Desktop.
Extract PDFs for macOS cursors
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -e | |
| cd "$(dirname "$0")" | |
| SRCDIR=$(pwd) | |
| OUTDIR=$SRCDIR/cursors | |
| mkdir -p "$OUTDIR" | |
| cd /System/Library/Frameworks/ApplicationServices.framework/Frameworks/HiServices.framework/Resources/cursors | |
| # if !(which pdf2svg); then | |
| # echo "Missing pdf2svg (http://www.cityinthesky.co.uk/opensource/pdf2svg). Try: brew install pdf2svg" | |
| # exit 1 | |
| # fi | |
| for dir in *; do | |
| if [[ -d $dir ]]; then | |
| serialno=0 | |
| for file in $dir/*.pdf; do | |
| echo "$dir" | |
| cp "$file" "$OUTDIR/$dir.pdf" | |
| # pdf2svg "$OUTDIR/$dir.pdf" "$OUTDIR/$dir.svg" | |
| done | |
| fi | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment