From: Frank Brehm Date: Tue, 20 Dec 2016 12:41:55 +0000 (+0100) Subject: committing changes in /etc after emerge run X-Git-Url: https://git.uhu-banane.net/?a=commitdiff_plain;h=257f8a358c197ecae6d13252de10f4c2f3dd427c;p=config%2Fberta%2Fetc.git committing changes in /etc after emerge run Package changes: +sys-libs/slang-2.2.4-r1 --- diff --git a/.etckeeper b/.etckeeper index b8bd629..eca7ed3 100755 --- a/.etckeeper +++ b/.etckeeper @@ -446,6 +446,7 @@ maybe chmod 0644 'skel/.bash_logout' maybe chmod 0644 'skel/.bash_profile' maybe chmod 0644 'skel/.bashrc' maybe chmod 0700 'skel/.ssh' +maybe chmod 0644 'slsh.rc' maybe chmod 0755 'snmp' maybe chmod 0644 'snmp/snmpd.conf.example' maybe chmod 0755 'ssh' diff --git a/slsh.rc b/slsh.rc new file mode 100644 index 0000000..e8043d9 --- /dev/null +++ b/slsh.rc @@ -0,0 +1,51 @@ +% -*- slang -*- + +% This file gets loaded whenever slsh runs. Its primary purpose is to define +% some functions that are useful in scripts, and to set up some local paths + +private define dir_exists (dir) +{ + variable s = stat_file (dir); + if (s == NULL) return 0; + return stat_is ("dir", s.st_mode); +} + +%!%+ +%\function{prepend_to_slang_load_path} +%\synopsis{Prepend a directory to the load-path} +%\usage{prepend_to_slang_load_path (String_Type dir)} +%\description +% This function adds a directory to the beginning of the interpreter's +% load-path. +%\seealso{append_to_slang_load_path, set_slang_load_path} +%!%- +public define prepend_to_slang_load_path (p) +{ + if (dir_exists (p)) + set_slang_load_path (sprintf ("%s%c%s", p, path_get_delimiter (), get_slang_load_path ())); +} + +%!%+ +%\function{append_to_slang_load_path} +%\synopsis{Append a directory to the load-path} +%\usage{append_to_slang_load_path (String_Type dir)} +%\description +% This function adds a directory to the end of the interpreter's +% load-path. +%\seealso{prepend_to_slang_load_path, set_slang_load_path} +%!%- +public define append_to_slang_load_path (p) +{ + if (dir_exists (p)) + set_slang_load_path (sprintf ("%s%c%s", get_slang_load_path (), path_get_delimiter (), p)); +} + +() = evalfile ("autoload.sl"); + +#ifdef __INTERACTIVE__ +() = evalfile ("slshrl.sl"); +#endif + +% Add local additions here + +prepend_to_slang_load_path("/usr/share/slsh/local-packages");