View Issue Details

IDProjectCategoryView StatusLast Update
0000617OpenFOAMBugpublic2012-08-28 15:35
Reporterwyldckat Assigned Tohenry  
PrioritylowSeveritytextReproducibilitysometimes
Status resolvedResolutionfixed 
PlatformLinuxOSUbuntu 
Summary0000617: Instructions for the Deb packages - Some users have difficulty in telling apart ` from '
DescriptionI've seen this before and was brought to my attention today once again. Some users have difficulty in telling apart ` from ' when using the command line, which leads them to be unable to properly follow these instructions: http://www.openfoam.org/download/ubuntu.php

The suggestion with this report is to change this line:
  VERS=`lsb_release -cs`

To this:
  VERS=$(lsb_release -cs)

It's an older form of doing the same thing, although harder to use in some corner cases...
Either way, this way it isn't as ambiguous for new users, so they won't have problems with the very first command they type for installing OpenFOAM ;)

Also, indicating that they check the assigned value would also be a good idea:
  echo $VERS
Additional InformationCame back to my attention on this post at the forum: http://www.cfd-online.com/Forums/openfoam-installation/103129-errors-while-installing-openfoam-ubuntu-12-04-11-10-a.html#post375664
TagsNo tags attached.

Activities

user19

2012-08-07 13:27

  ~0001563

Last edited: 2012-08-07 13:29

Not related to the issue, but why should $(...) be harder to use than `...`? IMHO it is the other way around, since you can easily nest $(...), but with the back-tick form you need to escape the nested substitution with a backslash. Also there's a clear distinction between the beginning and the end of the command substitution, using the back-ticks can be confusing in that respect.

wyldckat

2012-08-07 13:48

updater   ~0001564

Last edited: 2012-08-07 13:49

Maybe I phrased it wrong... the idea is to change to:
  VERS=$(lsb_release -cs)

simply because some users type the commands manually and use apostrophes instead of back-ticks. Either that or their keyboards don't have or have never used back-ticks...

wyldckat

2012-08-07 13:53

updater   ~0001566

Wait, now I under stand the remark about "harder"... I saw some corner cases sometime ago, due to character escaping... I'll have to search for them.

wyldckat

2012-08-07 14:09

updater   ~0001567

Mmmm... I apparently got the two methods switched when I memorized the information about them... back-ticks is the old form and has been considered a nightmare for quite sometime now. Here's an interesting report on this: http://www.linuxquestions.org/questions/linux-general-1/notation-difference-var%3D%60command%60-and-var%3D%24-command-458080/#post2307324

Nonetheless, even if $(...) is the best way to do things, I know there are some corner cases where it get very tricky to use this...

PS: sorry about using this report almost as a forum thread, but it seemed relevant to this issue.

user19

2012-08-07 14:25

  ~0001568

Last edited: 2012-08-07 20:01

Another, perhaps simpler way of getting people started, would be to provide a kickstarter script like the developer of homebrew does: http://mxcl.github.com/homebrew/

I imagine the instructions would look like

sh <(wget -qO - http://openfoam.org/download/ubuntu/go.sh)

The script could then do all the required setup, from writing a /etc/apt/sources.list.d/openfoam.list, to calling apt-get update to installing the appropriate packages.

user19

2012-08-07 20:00

  ~0001570

Something like this, perhaps? https://github.com/themiwi/OpenFOAM-Ubuntu-Installer

user19

2012-08-09 16:37

  ~0001581

Updated it to work for Fedora and OpenSUSE too. Relocated the repository to https://github.com/themiwi/OpenFOAM-Installer.

henry

2012-08-28 15:35

manager   ~0001641

Thanks for the suggestion, we have now replaced backquotes with the $() syntax to avoid problems for people typing the commands rather than using the easier copy/paste method.

Issue History

Date Modified Username Field Change
2012-08-07 11:22 wyldckat New Issue
2012-08-07 13:27 user19 Note Added: 0001563
2012-08-07 13:29 user19 Note Edited: 0001563
2012-08-07 13:48 wyldckat Note Added: 0001564
2012-08-07 13:49 wyldckat Note Edited: 0001564
2012-08-07 13:53 wyldckat Note Added: 0001566
2012-08-07 14:09 wyldckat Note Added: 0001567
2012-08-07 14:25 user19 Note Added: 0001568
2012-08-07 14:25 user19 Note Edited: 0001568
2012-08-07 20:00 user19 Note Added: 0001570
2012-08-07 20:01 user19 Note Edited: 0001568
2012-08-09 16:37 user19 Note Added: 0001581
2012-08-28 15:35 henry Note Added: 0001641
2012-08-28 15:35 henry Status new => resolved
2012-08-28 15:35 henry Resolution open => fixed
2012-08-28 15:35 henry Assigned To => henry