mirror of
https://github.com/elliotnunn/mac-rom.git
synced 2025-01-01 11:29:27 +00:00
47 lines
1.0 KiB
Plaintext
47 lines
1.0 KiB
Plaintext
|
# Takes no arguments -- expects to be inside the Make directory,
|
|||
|
# or run in place (select all, then cmd-return)
|
|||
|
|
|||
|
If "{0}" == ""
|
|||
|
Set 0 "{Active}"
|
|||
|
End
|
|||
|
|
|||
|
Set Tree "`Files -f "{0}" | StreamEdit -e '1 Replace /[<5B>:]*:[<5B>:]*<2A>/ -n'`"
|
|||
|
|
|||
|
If {#} == 1
|
|||
|
Set Tree "{1}"
|
|||
|
Else If {#} == 0
|
|||
|
Set MyPath "`Files -f "{0}"`"
|
|||
|
Set Tree "`Echo "{MyPath}" | StreamEdit -e '1 Replace /[<5B>:]*:[<5B>:]*<2A>/ -n'`"
|
|||
|
Else
|
|||
|
Echo "# USAGE: {0} [PATH]"
|
|||
|
Exit 1
|
|||
|
End
|
|||
|
|
|||
|
Set Count 0
|
|||
|
|
|||
|
Echo "# Suggested commands:"
|
|||
|
|
|||
|
For RootFolder in `Files -f "{Tree}" | StreamEdit -e '<27>,<2C> Replace /<2F>:.<2E>/ -n'`
|
|||
|
For UntypedFile in `Files -f -r -o -s -t '' {RootFolder}`
|
|||
|
Set NewT "TEXT"
|
|||
|
Set NewC "MPS "
|
|||
|
|
|||
|
If "{UntypedFile}" =~ /<2F>.x/
|
|||
|
Set NewT "XCOF"
|
|||
|
Else If "{UntypedFile}" =~ /<2F>.o/
|
|||
|
Set NewT "OBJ "
|
|||
|
Else If "{UntypedFile}" =~ /<2F>.lib/
|
|||
|
Set NewT "OBJ "
|
|||
|
Else If "{UntypedFile}" =~ /<2F>.rsrc/
|
|||
|
Set NewT "rsrc"
|
|||
|
Set NewC "RSED"
|
|||
|
End
|
|||
|
|
|||
|
Echo " SetFile -t <20>"{NewT}<7D>" -c <20>"{NewC}<7D>" <20>"{UntypedFile}<7D>""
|
|||
|
|
|||
|
Set Count `Evaluate {Count} + 1`
|
|||
|
End
|
|||
|
End
|
|||
|
|
|||
|
Echo "# Total: {Count}"
|