From mboxrd@z Thu Jan 1 00:00:00 1970 From: john at keeping.me.uk (John Keeping) Date: Mon, 11 Aug 2014 21:24:18 +0100 Subject: Compile cGit 2.0.4 In-Reply-To: <006e01cfb59e$5e615110$1b23f330$@jorge@decimal.pt> References: <005a01cfb59c$29c75a50$7d560ef0$@jorge@decimal.pt> <20140811195358.GB1261@serenity.lan> <006e01cfb59e$5e615110$1b23f330$@jorge@decimal.pt> Message-ID: <20140811202418.GC1261@serenity.lan> On Mon, Aug 11, 2014 at 08:56:40PM +0100, Jorge Bastos wrote: > > Do you have a weird CGIT_VERSION defined in your environment? The > > string $'\r' doesn't appear in gen-version.sh so I don't understand > > where that error can be coming from. > > > > Alternatively do you have a weird (non-POSIX) /bin/sh? What operating > > system are you using? > > I've always compiled cgit manually here. > Debian, sh is the normal "shtool" package. "shtool" isn't a shell. /bin/sh is probably either dash or bash. What does "dpkg -S /bin/sh" say? It looks like the problem is actually that the file has DOS line endings. I get the exact same problem you do if I run: unix2dos gen-version.sh Have you got Git's "core.eol" config set to "crlf"?