I was trying to get libetpan up and running on iOS, however there seemed to be something wrong with their setup shell script (problem explained in more detail here).. but basically I got a folder with a long list of symlinks pointing to nowhere ie
mhdriver_types.h -> ../../src/driver/implementation/mh/mhdriver_types.h
when in fact it should be
mhdriver_types.h -> ../../../src/driver/implementation/mh/mhdriver_types.h
I want to write a shell script that loops through all the symlinks, deleting each, then recreating a symlink for it to the same former destination only one subdirectory deeper.. basically doing what i did in the example to all the files..
any ideas?
inspired by anishsane’s answer i got this code that works: