If lde is on path, don't bother with MAIKODIR (#478)
This commit is contained in:
parent
c55239f744
commit
8ec1ca966d
44
run-medley
44
run-medley
@ -60,13 +60,11 @@ while [ "$#" -ne 0 ]; do
|
||||
export LDEINIT="$2"
|
||||
shift
|
||||
;;
|
||||
|
||||
"-nogreet" | "--nogreet")
|
||||
# Keep (GREET) from finding an init file
|
||||
mkdir -p $MEDLEYDIR/tmp/logindir
|
||||
export HOME=$MEDLEYDIR/tmp/logindir
|
||||
export LOGINDIR=$MEDLEYDIR/tmp/logindir
|
||||
|
||||
export LDEINIT="$MEDLEYDIR/greetfiles/NOGREET"
|
||||
;;
|
||||
"-greet" | "--greet")
|
||||
@ -133,8 +131,6 @@ while [ "$#" -ne 0 ]; do
|
||||
shift
|
||||
done
|
||||
|
||||
# not set on command line
|
||||
|
||||
if [ -z "$LDESRCESYSOUT" ] ; then
|
||||
if [ -f "$LDEDESTSYSOUT" ] ; then
|
||||
export LDESRCESYSOUT="$LDEDESTSYSOUT"
|
||||
@ -149,30 +145,24 @@ if [ -z "$geometry" ] ; then
|
||||
screensize="-sc 1440x900"
|
||||
fi
|
||||
|
||||
inferred_maikodir=false
|
||||
|
||||
if [ -z "$MAIKODIR" ] ; then
|
||||
# here we try two options relative to MEDLEYDIR: ./maiko and ../maiko
|
||||
# this is highly imperfect, but the user can always set the env variables
|
||||
export MAIKODIR="$MEDLEYDIR/../maiko"
|
||||
if [ ! -d "$MAIKODIR" ] ; then
|
||||
export MAIKODIR="$MEDLEYDIR/maiko"
|
||||
fi
|
||||
inferred_maikodir=true
|
||||
fi
|
||||
|
||||
if [ ! -d "$MAIKODIR/bin" ] ; then
|
||||
echo "MAIKODIR has no bin: $MAIKODIR"
|
||||
if [ inferred_maikodir = true ] ; then
|
||||
echo "I tried to infer it based on your working directory, but that didn't work."
|
||||
echo "Try setting the MAIKODIR environment variable to the right location."
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# if lde is already on path, don't reset it
|
||||
|
||||
if ! command -v "$prog" > /dev/null 2>&1; then
|
||||
# if lde is already on path, don't reset it
|
||||
# otherwise check for MAIKODIR
|
||||
|
||||
if [ -z "$MAIKODIR" ] ; then
|
||||
# try two options relative to MEDLEYDIR: ./maiko and ../maiko
|
||||
MAIKODIR="$MEDLEYDIR/../maiko"
|
||||
if ! command -v "$MAIKODIR/bin/osversion" > /dev/null 2>&1; then
|
||||
MAIKODIR="$MEDLEYDIR/maiko"
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! command -v "$MAIKODIR/bin/osversion" > /dev/null 2>&1; then
|
||||
echo "Could not find 'lde' on PATH"
|
||||
echo "nor MAIKODIR with 'bin/osversion' (to look for it)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
oldpath="$PATH"
|
||||
oldpwd=`pwd`
|
||||
PATH=.:"$PATH"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user