Skip to content

Commit 905e0af

Browse files
committed
Simplified script.
1 parent 7836ff1 commit 905e0af

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

metacall.rb

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,8 @@ def install
138138
system "cmake", *args, ".."
139139
system "cmake", "--build", ".", "--target", "install"
140140

141-
shebang = "#!/usr/bin/env bash\n"
142-
# debug = "set -euxo pipefail\n"
143-
144-
metacall_extra = [
141+
metacall_sh = [
142+
"#!/usr/bin/env bash\n",
145143
"SCRIPT_DIR=$(cd -- \"$(dirname -- \"${BASH_SOURCE[0]}\")\" &> /dev/null && pwd)\n",
146144
"PARENT=$(dirname \"${SCRIPT_DIR}\")\n",
147145
"if [ -f \"${PARENT}/metacallcli\" ]; then\n",
@@ -154,13 +152,12 @@ def install
154152
"export DETOUR_LIBRARY_PATH=\"${PREFIX}/lib\"\n",
155153
"export PORT_LIBRARY_PATH=\"${PREFIX}/lib\"\n",
156154
"export CONFIGURATION_PATH=\"${PREFIX}/configurations/global.json\"\n",
155+
"export LOADER_SCRIPT_PATH=\"\${LOADER_SCRIPT_PATH:-\`pwd\`}\"\n",
156+
"${PREFIX}/metacallcli $@\n"
157157
]
158-
cmds = [shebang, *metacall_extra]
159-
cmds.append("export LOADER_SCRIPT_PATH=\"\${LOADER_SCRIPT_PATH:-\`pwd\`}\"\n")
160-
cmds.append("${PREFIX}/metacallcli $@\n")
161158

162159
File.open("metacall.sh", "w") do |f|
163-
f.write(*cmds)
160+
f.write(*metacall_sh)
164161
end
165162

166163
chmod("u+x", "metacall.sh")

0 commit comments

Comments
 (0)