summaryrefslogtreecommitdiff
path: root/scripts/loadavg.in
diff options
context:
space:
mode:
authorOleg Pykhalov <go.wigust@gmail.com>2018-10-03 03:21:27 +0300
committerOleg Pykhalov <go.wigust@gmail.com>2018-10-03 05:10:27 +0300
commita07da6330991b2c28ed2b32ebd528fbe5593579a (patch)
treed3e0abbf4b43e0b07b4be7a4d1e51a87a4632b7f /scripts/loadavg.in
downloadguile-loadavg-a07da6330991b2c28ed2b32ebd528fbe5593579a.tar.gz
Initial commit.
* Makefile.am: New file. * bootstrap: New file. * build-aux/pre-inst-env.in: New file. * configure.ac: New file. * loadavg.scm: New file. * loadavg/config.scm.in: New file. * loadavg/ui.scm: New file. * scripts/loadavg.in: New file.
Diffstat (limited to 'scripts/loadavg.in')
-rw-r--r--scripts/loadavg.in27
1 files changed, 27 insertions, 0 deletions
diff --git a/scripts/loadavg.in b/scripts/loadavg.in
new file mode 100644
index 0000000..aa4363d
--- /dev/null
+++ b/scripts/loadavg.in
@@ -0,0 +1,27 @@
+#!@GUILE@ \
+--no-auto-compile -e main -s
+!#
+
+;;; Guile loadavg --- loadavg command-line interface.
+;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
+;;;
+;;; This file is part of Guile loadavg.
+;;;
+;;; Guile loadavg is free software; you can redistribute it and/or
+;;; modify it under the terms of the GNU General Public License as
+;;; published by the Free Software Foundation; either version 3 of the
+;;; License, or (at your option) any later version.
+;;;
+;;; Guile loadavg is distributed in the hope that it will be useful,
+;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;;; General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with Guile loadavg. If not, see
+;;; <http://www.gnu.org/licenses/>.
+
+(define* (main #:optional (args (command-line)))
+ (let ((loadavg-main (module-ref (resolve-interface '(loadavg ui))
+ 'loadavg-main)))
+ (exit (apply loadavg-main args))))