|
[Sponsors] |
[OpenFOAM.com] Error (Allwmake) : not located in $WM_PROJECT_DIR |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 17, 2019, 20:54 |
Error (Allwmake) : not located in $WM_PROJECT_DIR
|
#1 |
Member
Guy
Join Date: Jun 2019
Posts: 39
Rep Power: 6 |
Trying to install v1812 on my Fedora 30 box.
Error (Allwmake) : not located in $WM_PROJECT_DIR Why does this not work ? Code:
[me@Brix ~]$ WM_PROJECT_DIR=/home/me/openfoam-v1812 [me@Brix ~]$ export WM_PROJECT_DIR [me@Brix ~]$ echo $WM_PROJECT_DIR /home/me/openfoam-v1812 [me@Brix ~]$ cd $WM_PROJECT_DIR [me@Brix openfoam-v1812]$ ls Allwmake applications bin BuildIssues.txt COPYING doc etc META-INFO modules README.md src tutorials wmake [me@Brix openfoam-v1812]$ ls $WM_PROJECT_DIR Allwmake applications bin BuildIssues.txt COPYING doc etc META-INFO modules README.md src tutorials wmake [me@Brix openfoam-v1812]$ ./Allwmake WM_PROJECT_DIR is /home/me/openfoam-v1812 Error (Allwmake) : not located in $WM_PROJECT_DIR Check your OpenFOAM environment and installation I added the following to Allwmake to see what is getting passed in: Code:
echo echo WM_PROJECT_DIR is $WM_PROJECT_DIR echo I don't understand this code: Code:
cd ${0%/*} && wmakeCheckPwd "$WM_PROJECT_DIR" 2>/dev/null || { echo "Error (${0##*/}) : not located in \$WM_PROJECT_DIR" echo " Check your OpenFOAM environment and installation" exit 1 0% = a command line parameter right ? What if 0% = a null string ? Also... how about splitting vmakeCheckPwd from this if statement and if that fails issue an "Invalid Password" error message ? Last edited by wyldckat; July 9, 2019 at 19:10. Reason: Added [CODE][/CODE] markers |
|
July 9, 2019, 19:20 |
|
#2 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128 |
Quick answer:
__________________
|
|
July 12, 2021, 00:57 |
|
#3 |
New Member
Alexander Kazantcev
Join Date: Sep 2019
Posts: 23
Rep Power: 6 |
"source bashrc" needing.
|
|
July 19, 2021, 16:04 |
|
#4 |
Senior Member
|
Hi,
Code:
Special Parameters ... 0 Expands to the name of the shell or shell script. This is set at shell initialization. If bash is invoked with a file of commands, $0 is set to the name of that file. If bash is started with the -c option, then $0 is set to the first argument after the string to be exe- cuted, if one is present. Otherwise, it is set to the file name used to invoke bash, as given by argument zero. Code:
${parameter%word} ${parameter%%word} The word is expanded to produce a pattern just as in pathname expansion. If the pattern matches a trailing portion of the expanded value of parameter, then the result of the expan- sion is the expanded value of parameter with the shortest matching pattern (the ``%'' case) or the longest matching pattern (the ``%%'' case) deleted. If parameter is @ or *, the pattern removal operation is applied to each positional parameter in turn, and the expansion is the resultant list. If parameter is an array variable subscripted with @ or *, the pattern removal operation is applied to each member of the array in turn, and the expansion is the resultant list. Code:
${0%/} Code:
${0%/} Code:
$0 Code:
/Allwmake In your concrete case Code:
wmakeCheckPwd |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
y+ for cells located away from the wall | aylalisa | OpenFOAM Post-Processing | 5 | August 23, 2023 05:24 |
where is "rhoEqa.H" file located | Wilson Lee | OpenFOAM Programming & Development | 4 | April 15, 2019 07:22 |
Number of Energy Source Terms - Where are the Sources located? | mir9283 | FLUENT | 1 | June 5, 2018 17:42 |
Defining source terms at the wall located between two fluids | e_cfd | FLUENT | 3 | December 18, 2017 09:14 |
Find cell where an arbitrary point is located | hb12 | Fluent UDF and Scheme Programming | 0 | January 19, 2015 04:38 |