mc-wrapper.sh.in 329 B

123456789101112131415
  1. MC_USER=`id | sed 's/[^(]*(//;s/).*//'`
  2. MC_PWD_FILE="${TMPDIR-/tmp}/mc-$MC_USER/mc.pwd.$$"
  3. @bindir@/mc -P "$MC_PWD_FILE" "$@"
  4. if test -r "$MC_PWD_FILE"; then
  5. MC_PWD="`cat "$MC_PWD_FILE"`"
  6. if test -n "$MC_PWD" && test -d "$MC_PWD"; then
  7. cd "$MC_PWD"
  8. fi
  9. unset MC_PWD
  10. fi
  11. rm -f "$MC_PWD_FILE"
  12. unset MC_PWD_FILE
  13. unset MC_USER