Skip to content
Snippets Groups Projects
Commit a5267fe8 authored by Joan Solà Ortega's avatar Joan Solà Ortega
Browse files

Update ReadMe.md

parent 27b233b2
No related branches found
No related tags found
1 merge request!218Wolf script readme update
......@@ -10,6 +10,56 @@ 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):
- Create a small project `realpath` (here in `$HOME/dev/` as an example)
$ cd $HOME/dev
$ mkdir realpath
- Create a file `realpath.c` with the contents:
```c
// realpath.c
#include <stdio.h>
#include <stdlib.h>
int main (int argc, char* argv[])
{
if (argc > 1) {
for (int argIter = 1; argIter < argc; ++argIter) {
char *resolved_path_buffer = NULL;
char *result = realpath(argv[argIter], resolved_path_buffer);
puts(result);
if (result != NULL) {
free(result);
}
}
}
return 0;
}
```
- Create a file `Makefile` with the contents (leading whitespace are TABs!!)
```
#Makefile
OBJ = realpath.o
%.o: %.c
$(CC) -c -o $@ $< $(CFLAGS)
realpath: $(OBJ)
gcc -o $@ $^ $(CFLAGS)
```
- Then compile with make and put in a soft link with:
$ ln -s $(pwd)/realpath /usr/local/bin/realpath
#### SCRIPTS installation
* Move to the scripts folder
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment