File: defaults.sl

package info (click to toggle)
jed 0.99.18-8.etch.4
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 4,608 kB
  • ctags: 5,106
  • sloc: ansic: 39,429; sh: 3,426; makefile: 350
file content (34 lines) | stat: -rw-r--r-- 1,117 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
% defaults.sl
% 
% Evaluate all *.sl files in /etc/jed.d/
%
% At startup, site.sl looks for the existence of "defaults.sl" and loads
% it.  This file IS NOT distributed with JED (upstream) but added by the
% Debian jed-common package.
%
%  Copyright (c) 2005 The Debian Jed Maintainers Group
%  Released under the terms of the GNU General Public License (ver. 2 or later)

% dummy function, enables skipping the startup procecure from the command line
% with `jed --skip-debian-startup`
define skip_debian_startup() {}

% Evaluate all *.sl files in the jed configuration directory "/etc/jed.d/"
% in alphabetical order
define debian_startup()
{
    variable file, dir = listdir("/etc/jed.d/");
    foreach ( dir[array_sort(dir)] ) 
     {
        file = ();
        if (path_extname(file) == ".sl")
          () = evalfile(strcat("/etc/jed.d/", file));
     }
}
   
if ( andelse {BATCH != 2} 
     % skip startup scripts if jed is started as `jed-script`
     {wherefirst(__argv == "--skip-debian-startup") == NULL}
     % skip startup scripts if jed is started with --skip-debian-startup
   )
     debian_startup();