mirror of
https://github.com/dathere/ckan-devstaller.git
synced 2025-11-09 13:39:49 +00:00
fix: change to home dir before installing Ahoy
This commit is contained in:
parent
dfdfad0217
commit
acd5a94664
1 changed files with 2 additions and 1 deletions
|
|
@ -50,6 +50,7 @@ fn main() -> Result<()> {
|
||||||
|
|
||||||
if ans {
|
if ans {
|
||||||
let sh = Shell::new()?;
|
let sh = Shell::new()?;
|
||||||
|
let username = cmd!(sh, "whoami").read()?;
|
||||||
println!(
|
println!(
|
||||||
"\n{} Running {} and {}...",
|
"\n{} Running {} and {}...",
|
||||||
"1.".if_supports_color(Stdout, |t| t.style(step_style)),
|
"1.".if_supports_color(Stdout, |t| t.style(step_style)),
|
||||||
|
|
@ -80,7 +81,6 @@ fn main() -> Result<()> {
|
||||||
"✅ 2. Successfully installed curl and enabled SSH."
|
"✅ 2. Successfully installed curl and enabled SSH."
|
||||||
.if_supports_color(Stdout, |t| t.style(success_style))
|
.if_supports_color(Stdout, |t| t.style(success_style))
|
||||||
);
|
);
|
||||||
let username = cmd!(sh, "whoami").read()?;
|
|
||||||
|
|
||||||
let dpkg_l_output = cmd!(sh, "dpkg -l").read()?;
|
let dpkg_l_output = cmd!(sh, "dpkg -l").read()?;
|
||||||
let has_docker = cmd!(sh, "grep docker")
|
let has_docker = cmd!(sh, "grep docker")
|
||||||
|
|
@ -121,6 +121,7 @@ fn main() -> Result<()> {
|
||||||
"\n{} Installing Ahoy...",
|
"\n{} Installing Ahoy...",
|
||||||
"4.".if_supports_color(Stdout, |t| t.style(step_style)),
|
"4.".if_supports_color(Stdout, |t| t.style(step_style)),
|
||||||
);
|
);
|
||||||
|
sh.change_dir(format!("/home/{username}"));
|
||||||
cmd!(sh, "sudo curl -LO https://github.com/ahoy-cli/ahoy/releases/download/v2.5.0/ahoy-bin-linux-amd64").run()?;
|
cmd!(sh, "sudo curl -LO https://github.com/ahoy-cli/ahoy/releases/download/v2.5.0/ahoy-bin-linux-amd64").run()?;
|
||||||
cmd!(sh, "mv ./ahoy-bin-linux-amd64 ./ahoy").run()?;
|
cmd!(sh, "mv ./ahoy-bin-linux-amd64 ./ahoy").run()?;
|
||||||
cmd!(sh, "sudo chmod +x ./ahoy").run()?;
|
cmd!(sh, "sudo chmod +x ./ahoy").run()?;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue