1 2 3 4 5 6 7 8 9 10 11 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
|
.KEY oper/a,tmp/a,real/a,f1,f2,f3,f4,f5
. ; miscellaneous script functions for the Amiga
. ; SCCS Id: @(#)ifchange 3.2 96/02/04
. ; Copyright (c) Kenneth Lorber, Bethesda, Maryland, 1992, 1993, 1996.
. ; NetHack may be freely redistributed. See license for details.
FAILAT 6
IF <oper> EQ "MOVE"
IF EXISTS <real>
diff >T:mic -c <tmp> <real>
search from T:mic SEARCH "---" QUIET
IF WARN
echo "MOVE: no change"
delete <tmp>
ELSE
echo "MOVE: copy"
copy <tmp> <real> clone
delete <tmp>
ENDIF
ELSE
echo "MOVE: copy2"
copy <tmp> <real> clone
delete <tmp>
ENDIF
QUIT
ENDIF
IF <oper> EQ "TOUCH"
IF EXISTS <real>
diff >T:mic -c <tmp> <real>
search from T:mic SEARCH "---" QUIET
IF NOT WARN
echo "TOUCH: touch"
IF NOT <f1$@> EQ "@"
setdate <f1>
ENDIF
IF NOT <f2$@> EQ "@"
setdate <f2>
ENDIF
IF NOT <f3$@> EQ "@"
setdate <f3>
ENDIF
IF NOT <f4$@> EQ "@"
setdate <f4>
ENDIF
IF NOT <f5$@> EQ "@"
setdate <f5>
ENDIF
ENDIF
ENDIF
QUIT
ENDIF
echo "ifchange: '<oper>' not recognized"
quit 10
|