curl https://gist.githubusercontent.com/JLarky/4317558672148b2446861f8bb56c4f03/raw/4f6f3cd346cdcdf176ac1ac86b1049f503f6a4e5/script.ts > script.ts
bash script.ts
Created
January 26, 2024 08:46
-
-
Save JLarky/4317558672148b2446861f8bb56c4f03 to your computer and use it in GitHub Desktop.
Have you ever tried running TypeScript with Bash before?
This file contains 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 | |
/*/.this-doesnt-exist 2>/dev/null | |
## Please do not edit this part of the script, this is a loader created by "bunx bun-self" | |
if ! [ -x "$(command -v bun)" ]; then | |
echo "Installing bun.sh" | |
sleep 2 | |
curl -fsSL https://bun.sh/install | bash | |
echo "Now let's run the script" | |
echo "" | |
fi | |
bun $0 | |
exit 0 | |
#*/ | |
// Script starts here | |
import { $ } from "bun"; | |
await $`curl -s http://wttr.in`; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment