Calculate pauses in file operations.
[midnight-commander.git] / contrib / mc-wrapper.csh.in
blob1b00491bc49692847fc615c20496872f5b159fe5
1 if ($?MC_TMPDIR) then
2         setenv MC_PWD_FILE "`mktemp '$MC_TMPDIR/mc.pwd.XXXXXX'`"
3 else if ($?TMPDIR) then
4         setenv MC_PWD_FILE "`mktemp '$TMPDIR/mc.pwd.XXXXXX'`"
5 else
6         setenv MC_PWD_FILE "`mktemp '/tmp/mc.pwd.XXXXXX'`"
7 endif
9 @bindir@/mc -P "$MC_PWD_FILE" $*
11 if (-r "$MC_PWD_FILE") then
12         setenv MC_PWD "`cat '$MC_PWD_FILE'`"
13         if ("$MC_PWD" != "$cwd" && -d "$MC_PWD") then
14                 cd "$MC_PWD" || true
15         endif
16         unsetenv MC_PWD
17 endif
19 rm -f "$MC_PWD_FILE"
20 unsetenv MC_PWD_FILE