Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Launcher.sh #611

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,16 @@ Or just install it with `go`:
go install github.com/charmbracelet/gum@latest
```

```bash
git clone https://github.com/charmbracelet/gum.git && cd gum
go build
```
Or just use the launcher :
```bash
chmod +x launcher.sh
./launcher.sh
```
But don't forget to add it in your PATH
[releases]: https://github.com/charmbracelet/gum/releases

## Commands
Expand Down
19 changes: 19 additions & 0 deletions launcher.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

# CHMOD All files (.sh)
find . -type f -iname "*.sh" -exec chmod +x {} \;
go build

# Main choice function
function choice () {
MAI=$(gum input --placeholder "[G]um, [Q]uit")

if [ "$MAI" = "G" ]; then
./gum
fi
if [ "$MAI" = "Q" ]; then
exit
fi
}

choice