Differences From Artifact [c18da52b55]:
- File
utils/objfw-new
— part of check-in
[c70b66a228]
at
2017-06-04 16:05:48
on branch trunk
— Add objfw-new
objfw-new creates new source files from templates.
For now, this only has the boilerplate for an empty class and an empty
application, but will be extended over time. (user: js, size: 824) [annotate] [blame] [check-ins using]
To Artifact [6a6815b394]:
- File utils/objfw-new — part of check-in [478feb4614] at 2020-12-22 23:10:48 on branch trunk — Style change: Don't indent cases in shell scripts (user: js, size: 812) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
12 13 14 15 16 17 18 | type="$1" name="$2" test -z "$name" && show_help case "$1" in | | | | | | | | | | | | | | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | type="$1" name="$2" test -z "$name" && show_help case "$1" in app) test -f "$name.m" && already_exists "$name.m" cat >"$name.m" <<__EOF__ #import <ObjFW/ObjFW.h> @interface $name: OFObject <OFApplicationDelegate> @end OF_APPLICATION_DELEGATE($name) @implementation $name - (void)applicationDidFinishLaunching { [OFApplication terminate]; } @end __EOF__ ;; class) test -f "$name.h" && already_exists "$name.h" test -f "$name.m" && already_exists "$name.m" cat >"$name.h" <<__EOF__ #import <ObjFW/ObjFW.h> @interface $name: OFObject @end __EOF__ cat >"$name.m" <<__EOF__ #import "$name.h" @implementation $name @end __EOF__ ;; *) show_help ;; esac |