# HG changeset patch # User Christophe Lincoln # Date 1302573139 -7200 # Node ID 1780ef64bcd5e9fcaabe12daf4ba7ea87c858495 # Parent e4a7503f7efd774b6b60790e88ae72439fb881a1 Add SHell script colored sytax as seen in boot for /etc/init.d/local.sh diff -r e4a7503f7efd -r 1780ef64bcd5 boot.cgi --- a/boot.cgi Tue Apr 12 03:36:52 2011 +0200 +++ b/boot.cgi Tue Apr 12 03:52:19 2011 +0200 @@ -166,7 +166,7 @@

`gettext "Local startup commands"`

-`cat /etc/init.d/local.sh`
+$(cat /etc/init.d/local.sh | syntax_highlighter sh)
 
EOT ;; diff -r e4a7503f7efd -r 1780ef64bcd5 index.cgi --- a/index.cgi Tue Apr 12 03:36:52 2011 +0200 +++ b/index.cgi Tue Apr 12 03:52:19 2011 +0200 @@ -50,6 +50,8 @@ case "$WANT" in *.conf|*.lst) cat $WANT | syntax_highlighter conf ;; + *.sh|*.cgi) + cat $WANT | syntax_highlighter sh ;; *) cat $WANT ;; esac diff -r e4a7503f7efd -r 1780ef64bcd5 lib/libtazpanel --- a/lib/libtazpanel Tue Apr 12 03:36:52 2011 +0200 +++ b/lib/libtazpanel Tue Apr 12 03:52:19 2011 +0200 @@ -45,6 +45,9 @@ -e s"#^[A-Z]\([^']*\)=#\0#"g \ -e s"#^[a-z]\([^']*\)#\0#"g \ -e s"#\"\([^']*\)\"#\0#"g ;; + sh) + sed -e s"#^\#\([^']*\)#\0#"g \ + -e s"#\"\([^']*\)\"#\0#"g esac } diff -r e4a7503f7efd -r 1780ef64bcd5 styles/default/style.css --- a/styles/default/style.css Tue Apr 12 03:36:52 2011 +0200 +++ b/styles/default/style.css Tue Apr 12 03:52:19 2011 +0200 @@ -183,8 +183,9 @@ /* syntax_highlighter */ span.conf-comment { color: #666; } -span.conf-var { color: #1F1500; } -span.conf-val { color: #F35A00; } +span.conf-var { color: #1f1500; } +span.conf-val, span.sh-val { color: #f35a00; } +span.sh-comment { color: #b20000; } /* Misc */