- if [ -n "$SLOWTERM" ]; then
- MC_SLOW="--slow"
- fi
-
- case "$TERM" in
- screen*) # screen, screen.rxvt
- MC_XTERM="-x"
- ;;
- esac
-
- #TMPDIR="$HOME"/tmp
- #export TMPDIR
-
- MC_FOUND=NO
-
- for wrapper in \
- /usr/local/share/mc/bin/mc-wrapper.sh \
- /usr/local/libexec/mc/mc-wrapper.sh \
- /usr/share/mc/bin/mc-wrapper.sh; do
- if [ -r $wrapper ]; then
- . $wrapper $MC_SLOW $MC_XTERM "$@"
- rc=$?
- MC_FOUND=YES
- break
- fi
- done
-
- if [ $MC_FOUND = NO ]; then
- for mc in /usr/local/bin/mc /usr/bin/mc; do
- if [ -x $mc ]; then
- MC_TMP_DIR="${TMPDIR-/tmp}/mc-$USER"
- if [ ! -d MC_TMP_DIR="${TMPDIR-/tmp}/mc-$USER" ]; then
- MC_TMP_DIR="${TMPDIR-/tmp}"
- fi
- MC_PWD_FILE="$MC_TMP_DIR/mc.pwd.$$"
- mc_type="`mc_type.py $mc`"
- if [ "$mc_type" = old ]; then
- $mc -P $MC_SLOW $MC_XTERM "$@" > "$MC_PWD_FILE"
- elif [ "$mc_type" = new ]; then
- $mc -P "$MC_PWD_FILE" $MC_SLOW $MC_XTERM "$@"
- else
- continue
- fi
+ if [ -n "$SLOWTERM" ]; then
+ MC_SLOW="--slow"
+ fi
+
+ case "$TERM" in
+ screen*) # screen, screen.rxvt
+ MC_XTERM="-x"
+ ;;
+ esac
+
+ #TMPDIR="$HOME"/tmp
+ #export TMPDIR
+
+ MC_FOUND=NO
+
+ for wrapper in \
+ /usr/local/share/mc/bin/mc-wrapper.sh \
+ /usr/local/libexec/mc/mc-wrapper.sh \
+ /usr/share/mc/bin/mc-wrapper.sh; do
+ if [ -r $wrapper ]; then
+ . $wrapper $MC_SLOW $MC_XTERM "$@"