Created
August 26, 2021 20:01
-
-
Save i3p9/aee3a9ad08af4d5c42cd20043200d764 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Required parameters: | |
# @raycast.schemaVersion 1 | |
# @raycast.title Download Raycast Script | |
# @raycast.mode silent | |
# Optional parameters: | |
# @raycast.icon ⬇️ | |
# @raycast.packageName downloads script from clipboard | |
# Documentation: | |
# @raycast.description Downloads copied Raycast Script Command from clipboard | |
# @raycast.author Fahim Faisal | |
# @raycast.authorURL https://github.com/i3p9 | |
link=$(pbpaste) | |
scripts_dir=~/raycastscripts #PUT YOUR OWN Raycast Script Directory here | |
link=${link/github.com/raw.githubusercontent.com} | |
link=${link/\/blob/""} | |
filename=${link##*/} | |
wget "$link" -P "$TMPDIR" | |
if grep -q '@raycast.title' "$TMPDIR/$filename"; then | |
mv "$TMPDIR/$filename" "$scripts_dir" | |
echo "Raycast script found and downloaded to scripts directory" | |
else | |
rm "$TMPDIR/$filename" | |
echo "No raycast script found!" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment