From f1cd3c042aaf8aaa29ab166976012d2ed9cc907d Mon Sep 17 00:00:00 2001 From: merakor Date: Mon, 21 Dec 2020 11:29:26 +0000 Subject: cpt-lib: add ability to be used as a script - cpt script no longer ignores anything. - If cpt-lib is invoked from the command-line, it parses the given command-line arguments, making it possible to be used as a script. FossilOrigin-Name: 8484d0ff082d03f38fa41d7a5e76c21bfdd5951b6db5193bb4a7f17e74a5025e --- default.do | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'default.do') diff --git a/default.do b/default.do index cb45cd0..23cedf8 100644 --- a/default.do +++ b/default.do @@ -1,8 +1,5 @@ . ./config.rc -# Extensionless name of file -fn="${1%.*}" - case "$1" in all) redo-ifchange src/cpt-lib docs/all ;; dist) @@ -11,7 +8,9 @@ case "$1" in ;; src/cpt-lib) redo-ifchange "$1.in" - sed "s|@VERSION@|$VERSION|g" < "$1.in" > "$3" + sed -e "s|@VERSION@|$VERSION|g" \ + -e "s|@DOCSTRING@|Call functions from the library|g" < "$1.in" > "$3" + chmod +x "$3" ;; "cpt-$VERSION.tar.xz") redo docs/cpt.info -- cgit v1.2.3