[99599] trunk/dports/office/todotxt/Portfile

and.damore at macports.org and.damore at macports.org
Sun Nov 11 07:58:56 PST 2012


Revision: 99599
          http://trac.macports.org//changeset/99599
Author:   and.damore at macports.org
Date:     2012-11-11 07:58:56 -0800 (Sun, 11 Nov 2012)
Log Message:
-----------
port todotxt: moving sample config file to $prefix/share, editing notes. Ticket #36949

Modified Paths:
--------------
    trunk/dports/office/todotxt/Portfile

Modified: trunk/dports/office/todotxt/Portfile
===================================================================
--- trunk/dports/office/todotxt/Portfile	2012-11-11 07:20:32 UTC (rev 99598)
+++ trunk/dports/office/todotxt/Portfile	2012-11-11 15:58:56 UTC (rev 99599)
@@ -26,10 +26,15 @@
 
 destroot {
     xinstall -m 755 ${worksrcpath}/todo.sh ${destroot}${prefix}/bin/$name
-    xinstall -m 644 ${worksrcpath}/todo.cfg ${destroot}${prefix}/etc/todo.cfg-dist
+    xinstall -d -m 755 ${destroot}${prefix}/share/${name}
+    xinstall -m 644 ${worksrcpath}/todo.cfg ${destroot}${prefix}/share/${name}/todo.cfg-dist
 }
 
-notes "
-You will need to copy and then edit the default configuration\
-(${prefix}/etc/todo.cfg-dist) in your home directory.
-"
+patch {
+    # default cfg will try to write in $prefix/bin, since this isn't obvious from the config
+    # file we help the user avoiding this
+    reinplace "s|TODO_DIR=`dirname \"\$0\"`|TODO_DIR=\"\$HOME\"/.todo|" ${worksrcpath}/todo.cfg
+}
+
+notes "Copy the default configuration file from  ${prefix}/etc/todo.cfg-dist \
+to  ~/.todo/config  and customize it."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20121111/43306095/attachment.html>


More information about the macports-changes mailing list