diff options
author | merakor <cem@ckyln.com> | 2020-12-21 11:29:26 +0000 |
---|---|---|
committer | merakor <cem@ckyln.com> | 2020-12-21 11:29:26 +0000 |
commit | f1cd3c042aaf8aaa29ab166976012d2ed9cc907d (patch) | |
tree | 8d1f5a4ccfec51eabf3271def88b3283d3f21a67 /default.do | |
parent | 440af4f3ebfecd68dabf8ce5524fd3f953e81c71 (diff) | |
download | cpt-f1cd3c042aaf8aaa29ab166976012d2ed9cc907d.tar.gz |
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
Diffstat (limited to 'default.do')
-rw-r--r-- | default.do | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -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 |