Skip to content
New issue

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

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

Already on GitHub? # to your account

Automated script for initial dra download #263

Closed
chad-betamax opened this issue Jan 3, 2025 · 9 comments
Closed

Automated script for initial dra download #263

chad-betamax opened this issue Jan 3, 2025 · 9 comments

Comments

@chad-betamax
Copy link

I'm using dra within the just command runner to setup my workstation.

dra fits really well into this workflow - at the moment I use curl and dpkg to download and install dra and then dra itself to download and install the rest of the packages on the box.

Here's the (justfile) process I use now to install dra (and rust)

_dra := "https://github.com/devmatteini/dra/releases/download/0.7.0/dra_0.7.0-1_amd64.deb"
_rust := "https://sh.rustup.rs"
curl-installs:
    # Install rust
    @curl --proto '=https' --tlsv1.2 {{ _rust }} --silent --show-error --fail|sh -s -- -y

    # Install dra
    @curl --silent --show-error --location {{ _dra }} --output-dir /tmp --output dra.deb
    @sudo dpkg --install /tmp/dra.deb

Obviously that is not going to track the latest release of dra as I had to hardcode the url.

What would be really cool if there was a more automatic way of installing dra (kinda like if I had dra to install dra) similar to how the Rust installer works. In fact the just project has a similar installer curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to ~/bin.

Is something similar possible with dra?

@devmatteini
Copy link
Owner

Hi!

While there is no official automated script, I have a script in my dotfiles for that.

You can use this modified version to install the deb file:

TMP_DIR=$(mktemp --directory)
DEB_FILE="$TMP_DIR/dra.deb"

curl -s https://api.github.com/repos/devmatteini/dra/releases/latest \
| grep "browser_download_url.*_amd64.deb" \
| cut -d : -f 2,3 \
| tr -d \" \
| wget -O "$DEB_FILE" -i -

sudo dpkg -i "$DEB_FILE"

Since you are not the first user to ask about an automated script like this, I will try to make it when I have time 😄

@devmatteini
Copy link
Owner

Hi @chad-betamax!

I had time to write the script and you can use it now!
Read the documentation on how to use it: https://github.com/devmatteini/dra#prebuilt-binaries

If you have any question let me know 😄

@chad-betamax
Copy link
Author

Champion. Worked a charm.

@candrapersada
Copy link

candrapersada commented Jan 13, 2025

but there is no git information in windows?
https://github.com/devmatteini/dra#prebuilt-binaries

@devmatteini
Copy link
Owner

but there is no git information in windows?
https://github.com/devmatteini/dra#prebuilt-binaries

Can you elaborate more please? I don't understand what you mean

@candrapersada
Copy link

candrapersada commented Jan 13, 2025

curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/devmatteini/dra/refs/heads/main/install.sh | bash -s --
'bash' is not recognized as an internal or external command,
operable program or batch file.

there is no information about installing git windows in README.md
https://github.com/devmatteini/dra#prebuilt-binaries

@devmatteini
Copy link
Owner

I clarified that you need bash to run the install script, thanks.

@candrapersada
Copy link

why is there no dra version update information?

@devmatteini
Copy link
Owner

why is there no dra version update information?

You can now find it https://github.com/devmatteini/dra#update-dra

Feel free to open a pull request if you think more documentation is missing

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants