Merge branch '3577_file_copy_preallocation'
[midnight-commander.git] / contrib / mc-wrapper.sh.in
blob773bbd1db348fdb4e8ba1212b029a3974f075b87
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" "$@"
5 if test -r "$MC_PWD_FILE"; then
6 MC_PWD="`cat "$MC_PWD_FILE"`"
7 if test -n "$MC_PWD" && test -d "$MC_PWD"; then
8 cd "$MC_PWD"
9 fi
10 unset MC_PWD
13 rm -f "$MC_PWD_FILE"
14 unset MC_PWD_FILE
15 unset MC_USER