#!/usr/bin/env sh
# Command line tool which produces a stub `OuisyncLibFFI` framework in the current directory
#
# Xcode expects a valid binary target to be available at package resolution time at the location
# specified in Package.swift, otherwise it refuses to register any plugins. To work around this
# limitation, we include a gitignored stub in the repository that is then then first replaced by the
# the updater plugin with a link to the same stub in the build folder (the only folder writable
# within the build plugin sandbox), then replaced with a real framework by the build plugin.
#
# While the process seems to work, we may run into edge cases where the framework gets corrupted,
# resulting in the inability to run the updater script that would fix it. If and when that happens,
# run this script to reset the framework to its original stub version from git.
#
echo d - ./output
rm -Rf ./output
#
# Generated by shar $(find output -print)
#
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	.
#	./output
#	./output/OuisyncLibFFI.xcframework
#	./output/OuisyncLibFFI.xcframework/macos-x86_64
#	./output/OuisyncLibFFI.xcframework/macos-x86_64/Headers
#	./output/OuisyncLibFFI.xcframework/macos-x86_64/Headers/module.modulemap
#	./output/OuisyncLibFFI.xcframework/macos-x86_64/libouisync_ffi.a
#	./output/OuisyncLibFFI.xcframework/Info.plist
#
echo c - .
mkdir -p . > /dev/null 2>&1
echo c - ./output
mkdir -p ./output > /dev/null 2>&1
echo c - ./output/OuisyncLibFFI.xcframework
mkdir -p ./output/OuisyncLibFFI.xcframework > /dev/null 2>&1
echo c - ./output/OuisyncLibFFI.xcframework/macos-x86_64
mkdir -p ./output/OuisyncLibFFI.xcframework/macos-x86_64 > /dev/null 2>&1
echo c - ./output/OuisyncLibFFI.xcframework/macos-x86_64/Headers
mkdir -p ./output/OuisyncLibFFI.xcframework/macos-x86_64/Headers > /dev/null 2>&1
echo x - ./output/OuisyncLibFFI.xcframework/macos-x86_64/Headers/module.modulemap
sed 's/^X//' >./output/OuisyncLibFFI.xcframework/macos-x86_64/Headers/module.modulemap << '27ba995dcca9d28af9ee52fafa7cdc12'
Xmodule OuisyncLibFFI {
X    export *
X}
27ba995dcca9d28af9ee52fafa7cdc12
echo x - ./output/OuisyncLibFFI.xcframework/macos-x86_64/libouisync_ffi.a
sed 's/^X//' >./output/OuisyncLibFFI.xcframework/macos-x86_64/libouisync_ffi.a << '452e73dffcd1e38b0e076852cbd16868'
452e73dffcd1e38b0e076852cbd16868
echo x - ./output/OuisyncLibFFI.xcframework/Info.plist
sed 's/^X//' >./output/OuisyncLibFFI.xcframework/Info.plist << '176f576dd1dba006b62db63408ad24c2'
X<?xml version="1.0" encoding="UTF-8"?>
X<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
X<plist version="1.0">
X<dict>
X	<key>AvailableLibraries</key>
X	<array>
X		<dict>
X			<key>BinaryPath</key>
X			<string>libouisync_ffi.a</string>
X			<key>HeadersPath</key>
X			<string>Headers</string>
X			<key>LibraryIdentifier</key>
X			<string>macos-x86_64</string>
X			<key>LibraryPath</key>
X			<string>libouisync_ffi.a</string>
X			<key>SupportedArchitectures</key>
X			<array>
X				<string>x86_64</string>
X			</array>
X			<key>SupportedPlatform</key>
X			<string>macos</string>
X		</dict>
X	</array>
X	<key>CFBundlePackageType</key>
X	<string>XFWK</string>
X	<key>XCFrameworkFormatVersion</key>
X	<string>1.0</string>
X</dict>
X</plist>
176f576dd1dba006b62db63408ad24c2
exit
