Re: problem installing latest cogito

3 messages, 3 authors, 2016-06-15 · open the first message on its own page

Re: problem installing latest cogito

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:17

sean [off-list ref] writes:
On Sat, 21 Jan 2006 20:48:26 +0100
Petr Baudis [off-list ref] wrote:
quoted
quoted
                sed -e
's/\${COGITO_LIB}/\${COGITO_LIB:-\/home\/david\/lib\/cogito\/}/g; \

s/\${COGITO_SHARE}/\${COGITO_SHARE:-\/home\/david\/share\/cogito\/}/g'
\
                       $file > $file.new; \
                cat $file.new > $file; rm $file.new; \
        done
sed: -e expression #1, char 145: unterminated address regex
The problem seems to go away if you remove the quoted end-of-line:
That is not "the quoted end-of-line".  Backslashes do not have
any special meaning inside a single quote pair for bourne shell
quoting.  The script is passing the backslash to sed.

IIRC, make seems to do different things for the backslash at the
end of line depending on vintage, so if this scriptlet appears
in a Makefile you may have another version dependency.  I
usually cop out of this problem by having a separate shell
script and run it from the Makefile, instead of spelling out the
sed commandline in the Makefile.

I got a complaint or two that some version of sed does not like
';' to concatenate more than one commands, and have been trying
to train myself to do either multiple -e options or multi-line
scripts.  E.g when I am tempted to say:

	sed -e 's/foo/bar/;s/baz/boa/' froboz

Instead, I say either

	sed -e 's/foo/bar/' -e 's/baz/boa/' froboz

or

	sed -e '
        	s/foo/bar
                s/baz/boa/
	' froboz

I do not know how much of the above applies to your immediate
problem, but I hope some of it helps.

Re: problem installing latest cogito

From: Petr Baudis <hidden>
Date: 2016-06-15 22:42:17

Dear diary, on Sat, Jan 21, 2006 at 09:12:28PM CET, I got a letter
where Junio C Hamano [off-list ref] said that...
I got a complaint or two that some version of sed does not like
';' to concatenate more than one commands, and have been trying
to train myself to do either multiple -e options or multi-line
scripts.  E.g when I am tempted to say:

	sed -e 's/foo/bar/;s/baz/boa/' froboz

Instead, I say either

	sed -e 's/foo/bar/' -e 's/baz/boa/' froboz
Good idea, thanks. Hopefully this will fix Dave Morgan's problem.
Committed and pushed out.

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Of the 3 great composers Mozart tells us what it's like to be human,
Beethoven tells us what it's like to be Beethoven and Bach tells us
what it's like to be the universe.  -- Douglas Adams

Re: problem installing latest cogito

From: dave morgan <hidden>
Date: 2016-06-15 22:42:17

On Sat, 21 Jan 2006 22:06:22 +0100, Petr Baudis [off-list ref] wrote:
Dear diary, on Sat, Jan 21, 2006 at 09:12:28PM CET, I got a letter
where Junio C Hamano [off-list ref] said that...
quoted
I got a complaint or two that some version of sed does not like
';' to concatenate more than one commands, and have been trying
to train myself to do either multiple -e options or multi-line
scripts.  E.g when I am tempted to say:

	sed -e 's/foo/bar/;s/baz/boa/' froboz

Instead, I say either

	sed -e 's/foo/bar/' -e 's/baz/boa/' froboz
Good idea, thanks. Hopefully this will fix Dave Morgan's problem.
Committed and pushed out.
david@tower2:~/cogito$ cg-update -v
Fetching head...
Fetching objects...
progress: 27 objects, 33087 bytes
Fetching tags...
Tree change:
d1a89167fbe0287cc43609bf37534ba1a98614d9:3311308023fcbd526b37dfdc61e641ca18bc7f99
:100644 100644 f1fc272... 25a1d21... M  Makefile
:100755 100755 2970d86... 0021080... M  cg-admin-uncommit
:100755 100755 c7423ee... 8c2e852... M  cg-fetch
:100755 100755 9296e0f... 3b6defd... M  cg-merge
:100755 100755 5fd3f5b... 317d7e6... M  cg-push
:100755 100755 06a16fe... a2df345... M  cg-update

Applying changes...
Fast-forwarding a9c75f3b8b1adb01859ff2c9b028f72a247837c6 ->
3311308023fcbd526b37dfdc61e641ca18bc7f99
        on top of a9c75f3b8b1adb01859ff2c9b028f72a247837c6...
david@tower2:~/cogito$ make install
Generating cg-version...
install -m755 -d /home/david/bin
install cg-object-id cg-add cg-admin-lsobj cg-admin-uncommit
cg-branch-add cg-branch-ls cg-reset cg-clone cg-commit cg-diff
cg-export cg-help cg-init cg-log cg-merge cg-mkpatch cg-patch cg-fetch
cg-restore cg-rm cg-seek cg-status cg-tag cg-tag-ls cg-update cg
cg-admin-ls cg-push cg-branch-chg cg-admin-cat cg-clean
cg-admin-setuprepo cg-switch cg-version /home/david/bin
for i in 'cg-cancel:cg-reset' 'commit-id:cg-object-id' \
                'tree-id:cg-object-id' 'parent-id:cg-object-id' \
                'cg-commit-id:cg-object-id' \
                'cg-tree-id:cg-object-id' 'cg-parent-id:cg-object-id'
\
                'cg-pull:cg-fetch'; do \
                old=`echo $i | cut -d : -f 1`; \
                new=`echo $i | cut -d : -f 2`; \
                rm -f /home/david/bin/$old; \
                ln -s $new /home/david/bin/$old; \
        done
install -m755 -d /home/david/lib/cogito
install cg-Xlib cg-Xmergefile cg-Xfetchprogress /home/david/lib/cogito
cd /home/david/bin; \
        for file in cg-object-id cg-add cg-admin-lsobj
cg-admin-uncommit cg-branch-add cg-branch-ls cg-reset cg-clone
cg-commit cg-diff cg-export cg-help cg-init cg-log cg-merge cg-mkpatch
cg-patch cg-fetch cg-restore cg-rm cg-seek cg-status cg-tag cg-tag-ls
cg-update cg cg-admin-ls cg-push cg-branch-chg cg-admin-cat cg-clean
cg-admin-setuprepo cg-switch cg-version; do \
                sed -e
's/\${COGITO_LIB}/\${COGITO_LIB:-\/home\/david\/lib\/cogito\/}/g' \
                    -e
's/\${COGITO_SHARE}/\${COGITO_SHARE:-\/home\/david\/share\/cogito\/}/g'
\
                       $file > $file.new; \
                cat $file.new > $file; rm $file.new; \
        done
cd /home/david/lib/cogito; \
        for file in cg-Xlib cg-Xmergefile cg-Xfetchprogress; do \
                sed -e
's/\${COGITO_LIB}/\${COGITO_LIB:-\/home\/david\/lib\/cogito\/}/g' \
                    -e
's/\${COGITO_SHARE}/\${COGITO_SHARE:-\/home\/david\/share\/cogito\/}/g'
\
                       $file > $file.new; \
                cat $file.new > $file; rm $file.new; \
        done
install -m755 -d /home/david/share/cogito
install -m644 default-exclude /home/david/share/cogito
david@tower2:~/cogito$


works for me :-)

many thanks to all for sorting it out

best regards
Dave
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help