Skip to content

Commit

Permalink
Add a Unix shell script to set file types
Browse files Browse the repository at this point in the history
Because the previous README instructions did not specify *.sh files as
exempt from line-ending filtering, I have added SetFileTypes.sh as one-
liner.
  • Loading branch information
elliotnunn committed Feb 10, 2018
1 parent bbe9f79 commit 6d10398
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 49 deletions.
49 changes: 0 additions & 49 deletions Make/SuggestFileTypes

This file was deleted.

1 change: 1 addition & 0 deletions Misc/SetFileTypes.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cd "`dirname "$0"`"; cd ..; find . -type f -not -path '*/.*' -not -ipath './BuildResults/*' -not -ipath './Tools/*' -exec SetFile -t 'TEXT' -c 'MPS ' {} \;; find Tools -type f -not -path '*/.*' \( -ipath '*.c' -o -ipath '*.h' -o -ipath '*.make' \) -exec SetFile -t 'TEXT' -c 'MPS ' {} \;; find BuildResults -type f -not -path '*/.*' \( -ipath '*.o' -o -ipath '*.lib' \) -exec SetFile -t 'OBJ ' -c 'MPS ' {} \;; find . -type f -not -path '*/.*' \( -ipath '*.rsrc' -o -iname GoNativeResources \) -exec SetFile -t 'rsrc' -c 'RSED' {} \;
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,21 @@ Append this to `.git/info/attributes`:
* filter=maclines
*.lib -filter
*.o -filter
*.sh -filter
.gitignore -filter

Finally, do a once-off "re-smudge":

rm -rf ../mac-rom/*
git checkout .

Setting type and creator codes
------------------------------

Some MPW Tools require their input files to have the correct Mac OS file type ("TEXT" or "OBJ "), but Git does not save Mac OS type and creator codes. This shell script will correct the file types in a freshly cloned repo:

sh Misc/SetFileTypes.sh

Building
--------
This code is built with the [Macintosh Programmer's Workshop](https://en.wikipedia.org/wiki/Macintosh_Programmer%27s_Workshop) (MPW), which runs on the Classic Mac OS. To satisfy the memory requirements of the build process, the MPW Shell should get a memory partition of at least 16 MB. Once you have MPW set up, the build process is not particularly fussy.
Expand Down

0 comments on commit 6d10398

Please sign in to comment.