joelkevinjones / snippets

Claris Organizer in Java (COinJ)
0 stars 0 forks source link

Improve shell scripts #11

Open joelkevinjones opened 5 years ago

joelkevinjones commented 5 years ago

Use proper looping techniques to handle files with spaces in them:

find "${SRCDIR}" -name '*\.applescript' -and -not -path '*URLHandlers*' -and -not -path '*PalmDesktop*' -print0 |
while IFS= read -r -d '' f

snippets/MacResourceExtraction/extractPD is one example.

Other cleanups include using relative paths from script to find sibling repos:

app=`dirname "${0}"`/../appDir/appName