aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-04-30 12:56:05 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2020-04-30 12:56:05 +0200
commit7968d3b30a4da523ffaa2fbd23120921084bf54b (patch)
treeed094ea6206f9835d597bbbcae91959c2e2775c1
parentHandle TZ-rule with minimum start. (diff)
downloadcalp-7968d3b30a4da523ffaa2fbd23120921084bf54b.tar.gz
calp-7968d3b30a4da523ffaa2fbd23120921084bf54b.tar.xz
Move environment setup to standalone sh file.
-rw-r--r--README2
-rw-r--r--README.in2
-rwxr-xr-xmain6
-rwxr-xr-xmodule/main.scm8
4 files changed, 11 insertions, 7 deletions
diff --git a/README b/README
index ef1eab18..d958cc27 100644
--- a/README
+++ b/README
@@ -14,7 +14,7 @@ For basic usage, create a file ~/.config/calp/config.scm which (at
leasts) calls the f`calendar-files' with a list of files or
directories containing ics file. (Both single calendar files, and
vdir's are supported, see vdirsyncer and ikhal). Then run:
- module/main.scm html --chunked --count 1
+ ./main html --chunked --count 1
Which should generate a single HTML-page for the current month.
Contributing
diff --git a/README.in b/README.in
index 1b5515bb..f00fa796 100644
--- a/README.in
+++ b/README.in
@@ -5,7 +5,7 @@
Calp is primarily a program for loading calendar files (.ics's) from drendering them in different formats. The goal is however to also support fancy filtering, an edit server, and more. The currently working frontends is the HTML-frontend, which have the two main modes of a month-by-month in "week" view, or a table of a single month, and the terminal frontend. The terminatend is mostly for debugging purposes, but it's quite usable still.
For basic usage, create a file ~/.config/calp/config.scm which (at leasts) calls the f`calendar-files' with a list of files or directories containing ics file. (Both single calendar files, and vdir's are supported, see vdirsyncer and ikhal). Then run:
- module/main.scm html --chunked --count 1
+ ./main html --chunked --count 1
Which should generate a single HTML-page for the current month.
Contributing
diff --git a/main b/main
new file mode 100755
index 00000000..2d3e7e4a
--- /dev/null
+++ b/main
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+here=$(dirname $(realpath $0))
+. $here/env
+
+exec guile -e main -s $here/module/main.scm "$@"
diff --git a/module/main.scm b/module/main.scm
index 246e729c..c90adb0c 100755
--- a/module/main.scm
+++ b/module/main.scm
@@ -1,10 +1,8 @@
-#!/bin/bash
-# -*- mode: scheme; geiser-scheme-implementation: guile -*-
+;; -*- geiser-scheme-implementation: guile -*-
-. $(dirname $(dirname $(realpath $0)))/env
+(when (current-filename)
+ (add-to-load-path (dirname (current-filename))))
-exec guile -e main -s $0 "$@"
-!#
(use-modules (srfi srfi-1)
(srfi srfi-41)