* lib/mc.sh.in: Update to use the new -P option.

This commit is contained in:
Pavel Roskin 2002-10-31 05:26:54 +00:00
parent 33a20a08a1
commit f5bf601c7c
2 changed files with 13 additions and 7 deletions

View File

@ -1,5 +1,7 @@
2002-10-31 Pavel Roskin <proski@gnu.org>
* lib/mc.sh.in: Update to use the new -P option.
* configure.in: Displaying the install paths is too problematic
to implement properly. Remove this code.

View File

@ -1,12 +1,16 @@
mc ()
{
mkdir -p $HOME/.mc/tmp 2> /dev/null
chmod 700 $HOME/.mc/tmp
MC=$HOME/.mc/tmp/mc-$$
@prefix@/bin/mc -P "$@" > "$MC"
cd "`cat $MC`"
rm -f "$MC"
unset MC;
MC_PWD_FILE="/tmp/mc-$USER/mc.pwd.$$"
@prefix@/bin/mc -P "$MC_PWD_FILE" "$@"
if test -r "$MC_PWD_FILE"; then
MC_PWD="`cat $MC_PWD_FILE`"
if test -n "$MC_PWD" && test -d "$MC_PWD"; then
cd "$MC_PWD"
fi
fi
rm -f "$MC_PWD_FILE"
unset MC_PWD
unset MC_PWD_FILE
}
if test -n "$BASH_VERSION"; then