Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Make sqlite3 module available in Swift
#!/bin/sh
modulesDirectory=$DERIVED_FILES_DIR/modules
modulesMap=$modulesDirectory/module.modulemap
modulesMapTemp=$modulesDirectory/module.modulemap.tmp
mkdir -p "$modulesDirectory"
cat > "$modulesMapTemp" << MAP
module sqlite3 [system] {
header "$SDKROOT/usr/include/sqlite3.h"
link "sqlite3"
export *
}
MAP
diff "$modulesMapTemp" "$modulesMap" >/dev/null 2>/dev/null
if [[ $? != 0 ]] ; then
mv "$modulesMapTemp" "$modulesMap"
else
rm "$modulesMapTemp"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.