83cb1dd047
done ... * lib/Makefile.am: ... here. Add wrappers for mc to avoid defining complex shell scripts in functions and aliases. * lib/mc-wrapper.csh.in: New file - template for the script that runs mc and changes directory in csh. * lib/mc-wrapper.sh.in: New file - template for the script that runs mc and changes directory in sh.
16 строки
282 B
Bash
16 строки
282 B
Bash
#! /bin/sh
|
|
|
|
MC_PWD_FILE="${TMPDIR-/tmp}/mc-$USER/mc.pwd.$$"
|
|
@bindir@/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
|
|
unset MC_PWD
|
|
fi
|
|
|
|
rm -f "$MC_PWD_FILE"
|
|
unset MC_PWD_FILE
|