Classic Macintosh MPW tool for file synchronization
Go to file
Dietrich Epp 8e2efa707e Refactor allocation API
This way we don't need to expose MemError() to platform-independent
code.
2022-03-25 13:33:24 -04:00
.vscode VS Code: refine indentation settings 2022-03-24 23:44:37 -04:00
bazel Create build rules for generated data 2022-03-22 19:02:57 -04:00
charmap Create build rules for generated data 2022-03-22 19:02:57 -04:00
convert Refactor allocation API 2022-03-25 13:33:24 -04:00
gen Embed character map tables in executable 2022-03-24 23:44:37 -04:00
lib Refactor allocation API 2022-03-25 13:33:24 -04:00
scripts Create build rules for generated data 2022-03-22 19:02:57 -04:00
syncfiles.xcodeproj Remove usage of Carbon from command-line tool 2022-03-24 23:44:37 -04:00
.bazelrc Remove unused Bazel setting 2022-03-23 02:08:01 -04:00
.clang-format Adjust clang-format settings 2022-03-23 01:24:16 -04:00
.gitignore Add Bazel build scripts 2022-03-22 19:02:57 -04:00
BUILD.bazel Add Bazel build scripts 2022-03-22 19:02:57 -04:00
convert_line_endings.c Add plain text and XML files to filter list 2021-03-26 03:47:55 -04:00
convert_test.c Convert files incrementally 2021-03-24 04:20:45 -04:00
convert.c Convert files incrementally 2021-03-24 04:20:45 -04:00
convert.h Add plain text and XML files to filter list 2021-03-26 03:47:55 -04:00
copy.c Convert resource files 2021-03-24 04:20:46 -04:00
defs.h Add plain text and XML files to filter list 2021-03-26 03:47:55 -04:00
file.c Add plain text and XML files to filter list 2021-03-26 03:47:55 -04:00
Formats.md Generate conversion data for extended ASCII 2022-03-15 16:19:56 -04:00
LICENSE.txt
mac_from_unix_data.h Refactor table generator, handle line breaks 2021-12-14 13:12:52 -05:00
mac_from_unix.c Convert files incrementally 2021-03-24 04:20:45 -04:00
mac_to_unix.c Convert files incrementally 2021-03-24 04:20:45 -04:00
Makefile Add plain text and XML files to filter list 2021-03-26 03:47:55 -04:00
README.md Add plain text and XML files to filter list 2021-03-26 03:47:55 -04:00
sync.c Add plain text and XML files to filter list 2021-03-26 03:47:55 -04:00
test.sh Convert files incrementally 2021-03-24 04:20:45 -04:00
util.c Refactor: Pass conversion mode to file converter 2021-03-24 04:20:46 -04:00
WORKSPACE Create build rules for generated data 2022-03-22 19:02:57 -04:00

SyncFiles

SyncFiles is a tool for MPW (Macintosh Programmers Workshop) which synchronizes files between a Macintosh and Unix system. It is used to copy files between a classic Macintosh development environment (e.g. MPW running on Mac System 7) and a modern Unix environment (e.g. a Basilisk II host system or an AppleShare volume).

What SyncFiles Does

  • By default, only copies files which are newer than the destination file (unless -force is specified). This means that your classic Macintoshs system should have the clock set correctly!

  • Sets the modification timestamp of the destination file to match the timestamp of the source file.

  • Only synchronizes files which match hard-coded patterns.

  • Converts text files to UTF-8 and LF line endings for Unix systems; converts to Mac OS Roman and CR line endings for Macintosh systems. XML files are not re-encoded.

  • For resource files, converts by copying the Macintosh resource fork to the data fork.

  • Sets the file type and creator code, creating MPW Shell text files and ResEdit resource files.

File Patterns

Copies files named Makefile, and files with the following extensions:

  • C: .c .h

  • C++: .cc .cp .cpp .cxx .hh .hpp .hxx

  • Plain text: .txt

  • Resource: .rsrc

  • XML: .xml (CR-LF conversion only, no encoding conversion)

Usage

Operates in push or pull mode. The tool runs from inside the classic Macintosh environment, so the “push” mode copies from Macintosh to Unix, and the “pull” mode copies from Unix to Macintosh. It is assumed that the Macintosh directory is on a normal disk volume.

Basic Usage

To push files from the current directory,

SyncFiles <DestPath> -push

To pull files from the current directory,

SyncFiles <DestPath> -pull

Other Flags

  • -verbose: Print lots of boring messages.

  • -quiet: Print only errors and warnings.

  • -force: Ignore timestamps, copy all source files to destination.

  • -dry-run: Perform no actions, just print out what would be done.

  • -dir: Specify an alternat Macintosh directory to push from or pull to. By default, pushes from and pulls to the current directory.

  • -delete: Delete files in destination which are missing from source.

Testing

Run sh test.sh to test the text conversion code.

License

SyncFiles is distributed under the terms of the MIT license. See LICENSE.txt for details.