From 6ed35e1745e15ff6848ea401cae5cd352b41e9cc Mon Sep 17 00:00:00 2001 From: PierreMB Date: Wed, 23 Aug 2023 12:49:33 +0200 Subject: [PATCH] introduce github.com/mxcl/swift-sh --- projects/github.com/mxcl/swift-sh/package.yml | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 projects/github.com/mxcl/swift-sh/package.yml diff --git a/projects/github.com/mxcl/swift-sh/package.yml b/projects/github.com/mxcl/swift-sh/package.yml new file mode 100644 index 00000000..3502d553 --- /dev/null +++ b/projects/github.com/mxcl/swift-sh/package.yml @@ -0,0 +1,33 @@ +distributable: + url: "https://github.com/mxcl/swift-sh/archive/{{version}}.tar.gz" + # this obscure option dictates how many components are removed from the + # extracted tarball. + strip-components: 1 + +versions: + github: mxcl/swift-sh # reads github release tags + +platforms: + - darwin + # - linux/x86-64 + +dependencies: + # swift.org: 5 + +build: + dependencies: + tea.xyz/gx/cc: c99 + # swift.org: 5 + # apple.com/xcode: >=11 + script: + - swift build --disable-sandbox -c release + - mkdir -p {{prefix}}/bin + - mv $(swift build --configuration release --show-bin-path)/swift-sh {{prefix}}/bin + +provides: + - bin/swift-sh + +test: + - echo "#!/usr/bin/env swift sh" > test.swift + - swift-sh eject test.swift + - test -e Test/Package.swift