Skip to content
Snippets Groups Projects

Wolf script readme update

Merged Joan Solà Ortega requested to merge wolf_script_readme_update into master
1 file
+ 17
4
Compare changes
  • Side-by-side
  • Inline
+ 17
4
@@ -10,12 +10,17 @@ Helpful scripts to create WOLF tree elements (e.g. processors)
..*`sudo apt-get install realpath`
* __RealPath__ (Required, MacOSX): The realpath package above is not available for MacOSX. Here is an out-of-the-box alternative (credits to WaffleSouffle: https://stackoverflow.com/questions/3572030/bash-script-absolute-path-with-osx):
* __RealPath__ (Required, MacOSX): The realpath package above is not available for MacOSX.
Here is an out-of-the-box alternative
(credits to WaffleSouffle: https://stackoverflow.com/questions/3572030/bash-script-absolute-path-with-osx):
- Create a small project `realpath` (here in `$HOME/dev/` as an example)
```
$ cd $HOME/dev
$ mkdir realpath
$ cd realpath
```
- Create a file `realpath.c` with the contents:
@@ -27,7 +32,7 @@ Helpful scripts to create WOLF tree elements (e.g. processors)
int main (int argc, char* argv[])
{
if (argc > 1) {
for (int argIter = 1; argIter < argc; ++argIter) {
for (int argIter = 1; argIter < argc; ++argIter) {
char *resolved_path_buffer = NULL;
char *result = realpath(argv[argIter], resolved_path_buffer);
@@ -36,7 +41,7 @@ Helpful scripts to create WOLF tree elements (e.g. processors)
if (result != NULL) {
free(result);
}
}
}
}
return 0;
@@ -56,9 +61,17 @@ Helpful scripts to create WOLF tree elements (e.g. processors)
gcc -o $@ $^ $(CFLAGS)
```
- Then compile with make and put in a soft link with:
- Then compile with `make`:
```
$ make
```
- and put in a soft link with:
```
$ ln -s $(pwd)/realpath /usr/local/bin/realpath
```
#### SCRIPTS installation
Loading