Ticket #41762: Portfile-bash-completion.diff
File Portfile-bash-completion.diff, 1.4 KB (added by liberato@…, 11 years ago) |
---|
-
Portfile
old new 5 5 PortGroup github 1.0 6 6 7 7 github.setup ginatrapani todo.txt-cli 2.9 v 8 revision 18 revision 2 9 9 name todotxt 10 10 categories office 11 11 license GPL … … 25 25 26 26 build {} 27 27 28 post-patch { 29 reinplace "s/todo\\.sh/${name}/" ${worksrcpath}/todo_completion 30 } 31 28 32 destroot { 29 33 xinstall -m 755 ${worksrcpath}/todo.sh ${destroot}${prefix}/bin/$name 30 34 xinstall -d -m 755 ${destroot}${prefix}/share/${name} 31 35 xinstall -m 644 ${worksrcpath}/todo.cfg ${destroot}${prefix}/share/${name}/todo.cfg-dist 32 36 } 33 37 38 post-destroot { 39 set completions_path ${destroot}${prefix}/share/bash-completion/completions 40 xinstall -d ${completions_path} 41 xinstall -m 644 ${worksrcpath}/todo_completion ${completions_path}/${name} 42 } 43 34 44 patch { 35 45 # default cfg will try to write in $prefix/bin, since this isn't obvious from the config 36 46 # file we help the user avoiding this 37 47 reinplace "s|TODO_DIR=`dirname \"\$0\"`|TODO_DIR=\"\$HOME\"/.todo|" ${worksrcpath}/todo.cfg 38 48 } 39 49 50 variant bash_completion { 51 depends_run-append path:etc/bash_completion:bash-completion 52 } 53 40 54 notes "Copy the default configuration file from ${prefix}/etc/todo.cfg-dist \ 41 55 to ~/.todo/config and customize it."