Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Error in Linux Ubuntu ./update

(1/2) > >>

Pecan:
When I update the latest svn (5197) on Ubuntu, compile, then execute ./update, I get the following error:


--- Code: ---pecan@ubuntu:~/devel/trunk/src$ ./update
Creating output directory tree
Compressing core UI resources
Compressing plugins UI resources
Packing core UI bitmaps
Packing plugins UI bitmaps
Copying files
Stripping debug info from output tree
[: 114: ==: unexpected operator


--- End code ---


Shouldn't line 100 be:


--- Code: ---if [ "x$MSYSTEM" = "x" ] ; then

--- End code ---

*not*

--- Code: ---if [ "x$MSYSTEM" == "x" ] ; then

--- End code ---

Jenna:
No errors here.

The "update"-script has not been changed since svn r5092.

What do you have in line 114 ?
There should only be a "fi".

Jenna:
Cross-post with your edit.

No line 100 is correct.

The shell-syntax in this case is the same like in c++.

That means "==" tests if left and right value are equal, "=" assigns right value to left value (hope I expressed it right in english).

EDIT:

Just saw that this is only partial right, sorry.
If comparing strings bot "==" and "=" are allowed.

EDIT 2:

At least in bash:

http://tldp.org/LDP/abs/html/comparison-ops.html#SCOMPARISON1

Pecan:
Line 114 is "fi" but:

http://www.comptechdoc.org/os/linux/usersguide/linux_ugshellpro.html
Shell Programming
shows syntax for Bash as:

--- Code: ---# string1 = string2 = True if the strings are equal.
# string1 != string2 = True if the strings are not equal.

--- End code ---

not "=="

and when I change it to a single =, the ./update script works.

I recently accepted the Ubuntu update, so that might have done this.

./Update as downloaded


Synaptic  entry:

Jenna:
Which shell is used if "/bin/sh" is called (as the update-script does) ?


--- Code: ---jens@debian-inspiron:~$ ll /bin/sh
lrwxrwxrwx 1 root root 4 13. Mai 09:34 /bin/sh -> bash
jens@debian-inspiron:~$

--- End code ---

Nevertheless if it does not work with the "==" I can commit a change that only uses the "=", that should work (hopefully) with all shells.

EDIT:
Should be fixed in svn r5199.

Navigation

[0] Message Index

[#] Next page

Go to full version