![]() |
|
FreeBSD Ports and Packages Installation and upgrading of ports and packages on FreeBSD. |
![]() |
|
Thread Tools | Display Modes |
|
||||
![]()
So, after some trials and errors... I didn't get the installation script working! The shell is complaining about usage of -ne operator usage in if statement. I am novice in script debugging and that script is by far not simple. Anyway, I will give more tries, because the working Matlab on FreeBSD will be a strong motivation to switch.
Oh, and the next time I will dual-boot to FreeBSD, i will put that offending part of script here. I can't find a mistake in it. That's strange - opensource community, but has not the same scripting language! Even by using shell from linux emulation (/compat/linux/bin/bash) doesn't work! C'est bizarre! Last edited by coppermine; 21st May 2008 at 11:13 AM. |
|
||||
![]() Quote:
Also post the entire error output and any other relivent output from the script. Pasting the entire script content to pastebin for a months time or as an attachment might not hurt either. EDIT: I do learn new things every now and then that I didn't know were valid Bourne, but generally get along fine with /bin/sh. Quote:
FreeBSDs /bin/sh implementation is more focused on POSIX (i.e. the standard) then on extending the language. Look up the Almquist shell. The Bourne Again SHell (bash) is the standard GNU shell and equivalent to /bin/sh in the GNU operating system. The funky Linux/GNU symbiosis makes them bed-fellows when it comes to a shell. Although some Distros are using the Debian Almquist shell (dash) instead of bash; baiscally a port of NetBSD's sh to Linux. BourneAgain is a superset of Bourne which means Bourne script will run in bash but BourneAgain script (and Korn script in both cases) will not run in a Bourne shell if it uses BASH (or Korn) specific features. I write scripts strictly with a POSIX Bourne Sell in mind and beyond what it provides, usually tells me that I need to use a bigger scripting language. Although I must admit, I have recently considered writing for Korn instead of Bourne... But then using my scripts on Linux boxes could get more iffy :|
__________________
My Journal Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''. Last edited by TerryP; 21st May 2008 at 10:41 PM. |
|
||||
![]()
Ok, at last I got the hands to FreeBSD installation and that Matlab issue.
Code:
[root@amandine matlab]# /home/xeon/Matlab\ Linux\ 2006a/CD1/install -glnx86 expr: illegal option -- r usage: expr [-e] expression /home/xeon/Matlab Linux 2006a/CD1/install: line 197: [: -ne: unary operator expected usage: dirname string expr: illegal option -- r usage: expr [-e] expression /tmp/40023tmwinstall/install: line 197: [: -ne: unary operator expected -------------------------------------------------------------------------- Usage: install -h | [-<arch>] [-debug] [ [-t] | [-x] ] -h Help. Show command usage. -<arch> Assume this architecture when installing. You must specify a valid MATLAB arch (e.g. sol2, glnx86) -debug Turn on debugging messages. -t Use terminal setup. -x Use X Window setup. (Default) -------------------------------------------------------------------------- Code:
# # Check for link portably # if [ `expr "$lscmd" : '.*->.*'` -ne 0 ]; then filename=`echo "$lscmd" | awk '{ print $NF }'` That's it... if somebody can point out the cause of error and help to get the Matlab working, I would not hesitate to buy the beer (I don't drink, but this doesn't matter). |
|
||||
![]()
The best place is to would be a pastebin or a url to the d/l, pastebin.ca can have things set to remain on display for months.
Never used it so I'm not aware of this boards attachments policy. Code:
`expr "$lscmd" : '.*->.*'` -ne 0 the right side of the colon up until the closing back tick, ` is a regular expression to evaluate it against, I see no problem there. I think the entire script would help.
__________________
My Journal Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''. |
|
||||
![]()
coppermine,
hmm, i think i have an idea why the script is failing. please run the following commands: Code:
# cd /home/xeon/ # mkdir matlab_copy # tar cf - 'Matlab Linux 2006a' | tar xpf - -C matlab_copy # cd 'matlab_copy/Matlab Linux 2006a' # perl -i -pe 's/\b(expr)\s+?/$1 -- /g' install # /compat/linux/bin/sh ./install ![]() Last edited by ephemera; 25th May 2008 at 05:34 PM. |
|
||||
![]()
Thanks, ephemera. I will test this very soon - within a few days. Yesterday I tried to install the same Matlab distribution in fresh Xubuntu Hardy Haron installation. I made this just to wipe away the suspections about the correctness for the scripts. Needless to say.. everything went smooth and works good. (Except some warnings about lock assertion.. but who cares
![]() Yes, the pastebin.ca is working. I will post there the entire installation script. I think the cause of evil is there. |
![]() |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Matlab R2008b via linuxulator in FreeBSD, Installation Troubles | ninjatux | FreeBSD General | 2 | 24th March 2009 04:23 AM |
FreeBSD 7.1 kernel incompatible with a linux program | map7 | FreeBSD Installation and Upgrading | 7 | 5th November 2008 11:17 PM |
installing linux on freeBSD | freddybaker | Other BSD and UNIX/UNIX-like | 4 | 17th October 2008 03:40 PM |
[FreeBSD] which version of PostgreSQL? | MacApp | FreeBSD Ports and Packages | 8 | 12th July 2008 09:25 AM |
What version of FreeBSD should i choose | latorion | FreeBSD Installation and Upgrading | 4 | 19th May 2008 10:16 PM |