I use Valentina but not the libvreport_fat_release.dylib in my app. It’s 7 MB, so I’d like to remove it with a build script. I’ve based it on another build script posted on the forum that removes unwanted languages .lproj folders, but I keep getting a “no such file or directory” error. The path it seems OK to me. Can anyone tell me what’s wrong with this script?
dim dest as string
dest = CurrentBuildLocation + “/” +CurrentBuildAppName + “.app/Contents/vcomponents”
dim cmd as string
cmd = "/rm -rf " + dest + “/”
dim theOutput as string
theOutput = doshellcommand(cmd + “libvreport_fat_release.dylib”)
do you have this step before BUILD or after BUILD ?
if its before then that makes sense as it does not exist in the build location before the build
it would after
Why don’t your remove the file in the original Valentina build script? As far as I remember you just need to comment out the line with the report dylib.
If don’t want to change the Valentina script do a print to see the path of the file you want to delete.
I did modify the script (and there are many lines that need commenting out), but that caused problems with the latest build of Valentina. I thought this would be a less intrusive way (and I could use any new Valentina scripts without modification). I have looked at the pathname and it seems fine to me. But bash is extremely finicky, which is why I ask the question here.
What’s the value of dest?
If either your current path, or CurrentBuildAppName have a space in it, you may be confusing rm on the next line as spaces need to be escaped.
Thanks to you both for answering. It was indeed the /rm that was the problem (I had copied it from another script that deleted files post-build). When I removed the slash the file was found and removed properly. Again, thanks for your help.