lilalo

diff l3bashrc @ 84:2cb912bff2ea

* В журнале выводится имя курса, а не только его код
* Исправлена ошибка с фильтром при чтении журнала из XML-репозитория
Теперь всё ок
author devi
date Sat Feb 25 08:02:25 2006 +0200 (2006-02-25)
parents 44973d76ba4d
children 9f64b4cfa4f6
line diff
     1.1 --- a/l3bashrc	Sun Feb 19 16:02:42 2006 +0200
     1.2 +++ b/l3bashrc	Sat Feb 25 08:02:25 2006 +0200
     1.3 @@ -17,6 +17,7 @@
     1.4  
     1.5  _l3_start()
     1.6  {
     1.7 +    echo $- | grep -q i || return 0
     1.8      if _l3_is_running_here
     1.9      then
    1.10          _l3_env
    1.11 @@ -145,12 +146,15 @@
    1.12                  TIME=\"\`date +%s\`\"
    1.13                  DIR=\"\"
    1.14                  [ \"\${1#/}\" = \"\$1\" ] && DIR=\"\$PWD/\"
    1.15 -                DIFFNAME=\"\$PPID_\${TIME}_\`echo \$DIR\$1| /bin/sed s@_@__@ | /bin/sed 's@/@_@g'\`.diff\"
    1.16 +                DIFFNAME=\"\${L3_SESSION_ID}_\${TIME}\`echo \$DIR\$1| sed s@_@__@ | sed 's@/@_@g'\`.diff\"
    1.17                  old_file=\"/tmp/l3-saved-\$\$.\$RANDOM.\$RANDOM\"
    1.18                  /bin/cp -- \"\$1\" \"\$old_file\" 2> /dev/null
    1.19                  $editor_file \"\$@\" || ERR=\$?
    1.20 -                [ -e \"\$old_file\" ] && diff \"\$old_file\" \"\$1\" > \"\$L3_HOME/\$DIFFNAME\" 2> /dev/null \
    1.21 -                                  || diff /dev/null \"\$1\"  > \"\$L3_HOME/\$DIFFNAME\" 2> /dev/null
    1.22 +                [ -e \"\$old_file\" ] && diff \"\$old_file\" \"\$1\" > \"\$L3_HOME/\$DIFFNAME\" 2> /dev/null
    1.23 +                if [ "$?" == 2 ] 
    1.24 +                then 
    1.25 +                    diff /dev/null \"\$1\"  > \"\$L3_HOME/\$DIFFNAME\" 2> /dev/null
    1.26 +                fi
    1.27                  /bin/rm \"\$old_file\" 2> /dev/null
    1.28                  return \$ERR
    1.29              fi