Closed benjaminweb closed 11 years ago
Could you post sed --version
and make --version
please?
GNU Make 3.81
sed version not retrievable due to strict POSIX standard (i.e. FreeBSD version) followed by Apple (Mac OS X Mountain Lion, 10.8.3 Build 12D78). However, file /usr/bin/sed last modified 2012-07-28 16:27, MD5 (/usr/bin/sed) = fdd95634fd5b8e563bb57a842e28476e
On Mon, Apr 8, 2013 at 8:10 PM, Johannes S. notifications@github.comwrote:
Could you post sed --version and make --version please?
— Reply to this email directly or view it on GitHubhttps://github.com/ValiValpas/taskopen/issues/76#issuecomment-16067808 .
Unfortunately, I don't have a OSX environment available for testing, could you please try executing the following:
sed '/#PATH_EXT=/a \\nPATH_EXT=$(PREFIX)/share/taskopen/scripts' taskopen > taskopen.pl
and
sed s'/#PATH_EXT=.*/&\nPATH_EXT=$(PREFIX)\/share\/taskopen\/scripts/' taskopen > taskopen.pl
No issue, I try at my best:
% pwd /Users/benjaminweb/git/taskopen
sed '/#PATH_EXT=/a \nPATH_EXT=$(PREFIX)/share/taskopen/scripts' taskopen > taskopen.pl
% sed '/#PATH_EXT=/a \nPATH_EXT=$(PREFIX)/share/taskopen/scripts' taskopen
taskopen.pl % sed: 1: "/#PATH_EXT=/a \nPATH_E ...": extra characters after \ at the end of a command
% sed s'/#PATH_EXT=.*/&\nPATH_EXT=$(PREFIX)\/share\/taskopen\/scripts/' taskopen > taskopen.pl % [NO RESULT]
On Tue, Apr 9, 2013 at 9:46 AM, Johannes S. notifications@github.comwrote:
Unfortunately, I don't have a OSX environment available for testing, could you please try executing the following:
sed '/#PATH_EXT=/a \nPATH_EXT=$(PREFIX)/share/taskopen/scripts' taskopen > taskopen.pl
and
sed s'/#PATH_EXT=.*/&\nPATH_EXT=$(PREFIX)\/share\/taskopen\/scripts/' taskopen > taskopen.pl
— Reply to this email directly or view it on GitHubhttps://github.com/ValiValpas/taskopen/issues/76#issuecomment-16098803 .
Alright, in order to fix this you can replace the "sed.." line in your Makefile with the second variant. The fix will also make it into the next release. Thank you.
% make PREFIX=/usr rm -f taskopen.pl sed s'/#PATHEXT=./&\nPATH_EXT=/usr\/share\/taskopen\/scripts/' taskopen > taskopen.pl sed: 1: "s/#PATHEXT=./&\nPATH_ ...": bad flag in substitute command: 'u' make: *\ [taskopen.pl] Error 1
There seems to be a missing '\' before the "/usr"!
% make PREFIX=\/usr rm -f taskopen.pl sed s'/#PATHEXT=./&\nPATH_EXT=/usr\/share\/taskopen\/scripts/' taskopen > taskopen.pl sed: 1: "s/#PATHEXT=./&\nPATH_ ...": bad flag in substitute command: 'u' make: *\ [taskopen.pl] Error 1
On Wed, Apr 10, 2013 at 4:28 PM, Johannes S. notifications@github.comwrote:
There seems to be a missing '\' before the "/usr"!
— Reply to this email directly or view it on GitHubhttps://github.com/ValiValpas/taskopen/issues/76#issuecomment-16177496 .
Oh, I'm sorry. I didn't recognize that "/usr" was provided externally. I think I have to do some further investigation on this issue.
The new, and better, sed command is:
sed s',#PATH_EXT=.*,&\nPATH_EXT=$(PREFIX)/share/taskopen/scripts,' taskopen > taskopen.pl
It should fix this issue finally.
Thanks for rapid fix. Confirm it does work now.
Hello! I am having the same issue, have tried your steps above to no avail. Completely understand that this project is not aimed at MacOS, and wouldn't bother if it wasn't for a mac being my work's daily driver of choice.
Just to be clear, I get:
gzip -c doc/man/taskopen.1 > doc/man/taskopen.1.gz
gzip -c doc/man/taskopenrc.5 > doc/man/taskopenrc.5.gz
sed s',#PATH_EXT=.*,&\nPATH_EXT=/usr/share/taskopen/scripts,' taskopen > taskopen.pl
sed -i'.bak' s',/usr/bin/perl,/usr/bin/perl,' taskopen.pl```
...when trying to make your project.
Thanks in advance
Ross
@ross-ops I don't see any error message in your quote. Can you please provide the complete output (including the command you're executing) and/or a description of the incorrect behaviour?
Sorry sure :)
$ make PREFIX=/usr
gzip -c doc/man/taskopen.1 > doc/man/taskopen.1.gz
gzip -c doc/man/taskopenrc.5 > doc/man/taskopenrc.5.gz
sed s',#PATH_EXT=.*,&\nPATH_EXT=/usr/share/taskopen/scripts,' taskopen > taskopen.pl
sed -i'.bak' s',/usr/bin/perl,/usr/bin/perl,' taskopen.pl
$ make PREFIX=/usr install
gzip -c doc/man/taskopen.1 > doc/man/taskopen.1.gz
gzip -c doc/man/taskopenrc.5 > doc/man/taskopenrc.5.gz
sed s',#PATH_EXT=.*,&\nPATH_EXT=/usr/share/taskopen/scripts,' taskopen > taskopen.pl
sed -i'.bak' s',/usr/bin/perl,/usr/bin/perl,' taskopen.pl
mkdir -p //usr/bin
install -m 0755 taskopen.pl //usr/bin/taskopen
install: //usr/bin/taskopen: Operation not permitted
make: *** [install] Error 71
Thanks for replying
@ross-ops the last three lines are the relevant ones. The install operation, which tries to copy the taskopen.pl script to /usr/bin/taskopen
, fails as this operation is not permitted. This is because you, i.e. your user, rightly do not have write permissions to /usr/bin
. You must therefore execute make PREFIX=/usr install
command as root, e.g. by using sudo
.
Hi there. Sudo-ing didn't help, but I changed the PREFIX variable to some other folder in my path, and that all sprang into life.
Thanks very much for you project, and time. R
% make PREFIX=/usr rm -f taskopen.pl sed '/#PATH_EXT=/ a\ PATH_EXT=/usr/share/taskopen/scripts' taskopen > taskopen.pl sed: 1: "/#PATH_EXT=/ aPATH_EXT= ...": command a expects \ followed by text make: *\ [taskopen.pl] Error 1
same happens by executing a make only