mc-wrapper.csh.in 406 B

123456789101112131415161718192021
  1. set MC_USER="`id | sed 's/[^(]*(//;s/).*//'`"
  2. if ($?TMPDIR) then
  3. setenv MC_PWD_FILE $TMPDIR/mc-$MC_USER/mc.pwd.$$
  4. else
  5. setenv MC_PWD_FILE /tmp/mc-$MC_USER/mc.pwd.$$
  6. endif
  7. @bindir@/mc -P "$MC_PWD_FILE" $*
  8. if (-r "$MC_PWD_FILE") then
  9. setenv MC_PWD "`cat '$MC_PWD_FILE'`"
  10. if ( -d "$MC_PWD" ) then
  11. cd "$MC_PWD"
  12. endif
  13. unsetenv MC_PWD
  14. endif
  15. rm -f "$MC_PWD_FILE"
  16. unsetenv MC_PWD_FILE
  17. unsetenv MC_USER