Skip to content

Commit

Permalink
fix install
Browse files Browse the repository at this point in the history
  • Loading branch information
tsirysndr committed Jul 6, 2024
1 parent a37ca66 commit 25beb8c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ pub fn setup() -> Result<String, Error> {

let stdout = dag()
.pkgx()?
.with_exec(vec!["sh", "-c", "mkdir -p $HOME/.local/bin"])?
.with_exec(vec!["mkdir", "-p", &format!("{}/.local/bin", home)])?
.with_exec(vec!["type wget || pkgx install wget"])?
.with_exec(vec![
&format!("type drone-ssh > /dev/null || wget https://github.com/appleboy/drone-ssh/releases/download/v{}/drone-ssh-{}-{}-{}", drone_ssh_version, drone_ssh_version, os, arch),
])?
.with_exec(vec![
&format!("type drone-ssh > /dev/null || chmod a+x drone-ssh-{}-{}-{}", drone_ssh_version, os, arch)])?
.with_exec(vec![
&format!("type drone-ssh > /dev/null || mv drone-ssh-{}-{}-{} $HOME./local/bin/drone-ssh", drone_ssh_version, os, arch),
&format!("type drone-ssh > /dev/null || mv drone-ssh-{}-{}-{} {}./local/bin/drone-ssh", drone_ssh_version, os, arch, home),
])?
.with_exec(vec![
&format!("type drone-scp > /dev/null || wget https://github.com/appleboy/drone-scp/releases/download/v{}/drone-scp-{}-{}-{}",drone_scp_version, drone_scp_version, os, arch),
Expand All @@ -56,7 +56,7 @@ pub fn setup() -> Result<String, Error> {
drone_scp_version, os, arch
)])?
.with_exec(vec![
&format!("type drone-scp > /dev/null || mv drone-scp-{}-{}-{} $HOME/.local/bin/drone-scp", drone_scp_version, os, arch),
&format!("type drone-scp > /dev/null || mv drone-scp-{}-{}-{} {}/.local/bin/drone-scp", drone_scp_version, os, arch, home),
])?
.stdout()?;
Ok(stdout)
Expand Down

0 comments on commit 25beb8c

Please sign in to comment.