dir = "/Users/ott/ottl/project/lib/"

cd dir + "MACOSX64"
libs = findfile("*.a")
cd dir + "MACOS"
exec "rm *.a"

for i=1, nelements(libs) {
  print "lipo -create -output " + libs[i] + " " + dir + "MACOSX64/" + libs[i] + " " + dir + "MACOSARM64/" + libs[i]
  exec "lipo -create -output " + libs[i] + " " + dir + "MACOSX64/" + libs[i] + " " + dir + "MACOSARM64/" + libs[i]
}
