lilalo

diff lm-install @ 19:e2f1de29a491

Не обязательно файл ~/.labmaker/lab
должен содержать код лабораторной работы
author devi
date Sun Sep 18 19:33:03 2005 +0300 (2005-09-18)
parents 37d701f903ec
children 098664cf339c
line diff
     1.1 --- a/lm-install	Thu Jun 16 11:44:38 2005 +0300
     1.2 +++ b/lm-install	Sun Sep 18 19:33:03 2005 +0300
     1.3 @@ -71,15 +71,18 @@
     1.4  	# LabMaker:START
     1.5  	TTY=`tty` 
     1.6  
     1.7 +	uname -a | grep -qi bsd && bsd=yes
     1.8 +
     1.9  	this_term=`w | grep "${TTY##/dev/}" | awk '{print $8;}'`
    1.10  	# freeBSD: 
    1.11 -	this_term=`w | grep "${TTY##/dev/tty}" | awk '{print $6;}'`
    1.12 +	[ -n "$bsd" ] && this_term=`w | grep "${TTY##/dev/tty}" | awk '{print $6;}'`
    1.13 +
    1.14  
    1.15  
    1.16  	LMHOME=~/.labmaker
    1.17  	mkdir -p ${LMHOME}
    1.18  	flush="-f"	#linux
    1.19 -	flush="-t 0"	#freebsd
    1.20 +	[ -n "$bsd" ] && flush="-t 0"	#freebsd
    1.21  	export PS1='\[`	a="$?";
    1.22  		HIDDEN=$([ "$a" = 0 ] || echo -n ^"$a")$(echo -n _${UID}_)$(echo -n _$$_)$(date\
    1.23  			+"%j$(cat ~/.labmaker/lab 2>/dev/null) %H:%M:%S");