Closed Zid-Zidane closed 10 months ago
#! /bin/sh
cd ~/
git clone https://github.com/L-Zephyr/Drafter.git
cd Drafter
# check if static link is needed
if [ -d "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift_static/macosx" ];then
# swift build -c release -Xswiftc -static-stdlib
swift build -c release
else
swift build -c release
fi
unzip -o ./Template/template.zip -d ./Template/drafter
cp -f -r ./Template/drafter/template/ ~/.drafter
cd .build/release
cp -f drafter /usr/local/bin/drafter
cd ~/
rm -rf Drafter
Environment
【Mac】Apple M2 【OS】14.1.1 (23B81)
What I have done
curl "https://raw.githubusercontent.com/L-Zephyr/Drafter/master/install.sh" | /bin/sh
What I have got
Cloning into 'Drafter'... remote: Enumerating objects: 2485, done. remote: Total 2485 (delta 0), reused 0 (delta 0), pack-reused 2485 Receiving objects: 100% (2485/2485), 12.68 MiB | 3.16 MiB/s, done. Resolving deltas: 100% (1397/1397), done. Fetching https://github.com/kylef/Spectre.git from cache Fetching https://github.com/kylef/PathKit.git from cache Fetching https://github.com/L-Zephyr/SwiftyParse.git from cache Fetched https://github.com/kylef/Spectre.git (1.81s) Fetched https://github.com/L-Zephyr/SwiftyParse.git (1.81s) Fetched https://github.com/kylef/PathKit.git (1.81s) Computing version for https://github.com/L-Zephyr/SwiftyParse.git Computed https://github.com/L-Zephyr/SwiftyParse.git at 0.1.0 (0.51s) Computing version for https://github.com/kylef/PathKit.git Computed https://github.com/kylef/PathKit.git at 0.9.1 (0.63s) Computing version for https://github.com/kylef/Spectre.git Computed https://github.com/kylef/Spectre.git at 0.8.0 (0.54s) Creating working copy for https://github.com/kylef/PathKit.git Working copy of https://github.com/kylef/PathKit.git resolved at 0.9.1 Creating working copy for https://github.com/kylef/Spectre.git Working copy of https://github.com/kylef/Spectre.git resolved at 0.8.0 Creating working copy for https://github.com/L-Zephyr/SwiftyParse.git Working copy of https://github.com/L-Zephyr/SwiftyParse.git resolved at 0.1.0 warning: 'drafter': the target name drafter has different case on the filesystem and the Package.swift manifest file Building for production... remark: Incremental compilation has been disabled: it is not compatible with whole module optimization remark: Incremental compilation has been disabled: it is not compatible with whole module optimization error: -static-stdlib is no longer supported for Apple platforms error: -static-stdlib is no longer supported for Apple platforms Archive: ./Template/template.zip creating: ./Template/drafter/template/ inflating: ./Template/drafter/template/index.html inflating: ./Template/drafter/template/bundle.js Untitled-1.sh: line 16: cd: .build/release: No such file or directory cp: drafter: No such file or directory
What I need help
How to solve this problem?
error: -static-stdlib is no longer supported for Apple platforms error: -static-stdlib is no longer supported for Apple platforms