File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # Dependency: This script requires `swift` installed.
4
+ # Install via https://swift.org/download/
5
+
6
+ # Required parameters:
7
+ # @raycast.schemaVersion 1
8
+ # @raycast.title Search Script Command (Bash)
9
+ # @raycast.mode fullOutput
10
+ # @raycast.packageName Searches
11
+ #
12
+ # Optional parameters:
13
+ # @raycast.author Thiago Holanda
14
+ # @raycast.authorURL https://twitter.com/tholanda
15
+ # @raycast.icon 🔎
16
+ # @raycast.description Search for Script Commands available in the Raycast repository
17
+ # @raycast.argument1 { "type": "text", "placeholder": "Query"}
18
+
19
+ # Files related to this Script Command:
20
+ # - search-script-command.sh (this file)
21
+ # - search-script-command.swift
22
+ # - search-script-command (this binary file will be generated by swiftc)
23
+
24
+ filename=${0##*/ }
25
+ basename=${filename% .* }
26
+ swift_filename=" $basename .swift"
27
+
28
+ if [ ! -f $basename ] && [ -f $swift_filename ]; then
29
+ $( swiftc $swift_filename -emit-executable -o $basename )
30
+ fi
31
+
32
+ ./$basename " $1 "
You can’t perform that action at this time.
0 commit comments